In password_policy.admin.inc line 458 at the end of the submit function

drupal_goto('admin/config/people/password_policy/list');

should be replaced with the usual form state redirect infomation.

$form_state[‘redirect’] = 'admin/config/people/password_policy/list';

then drupal_form_submit can be used to create password policies programmatically.

Comments

erikwebb’s picture

Status: Active » Needs review
StatusFileSize
new421 bytes

Please try this patch and let me know if that fixes the problem for you.

Status: Needs review » Needs work

The last submitted patch, password_policy-allow_create_programmatically-1809088-1.patch, failed testing.

erikwebb’s picture

Version: 7.x-1.2 » 7.x-1.3
Status: Needs work » Needs review
StatusFileSize
new417 bytes
erikwebb’s picture

FYI - This is also being fixed in a CTools-based way for 7.x-2.x.

somersoft’s picture

This works for me.

erikwebb’s picture

Status: Needs review » Fixed

This was fixed and I forgot to update here.

http://drupalcode.org/project/password_policy.git/commit/f41cf2f

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.