The module works as expected, but the solution used could be improved:
Currently Core's system module defines a form element type password_confirm which has two FAPI process functions itself:
$types['password_confirm'] = array(
'#input' => TRUE,
'#process' => array('form_process_password_confirm', 'user_form_process_password_confirm'),
'#theme_wrappers' => array('form_element'),
);
system.module - function system_element_info
- form_process_password_confirm - adds two inputs: password and the confirmation and the validation function
- user_form_process_password_confirm - adds the JS validation
If we disable user_form_process_password_confirm function using hook_element_info_alter using a better undestanding of Form API we can avoid:
Comments
Comment #1
jherencia commentedI forgot the patch.
Comment #1.0
jherencia commentedAdded style.
Comment #1.1
jherencia commentedMinor language mistakes fixed.
Comment #2
nagiek commentedThis patch works great for me. Can one of the maintainers commit it? If not, given that it's a re-write, maybe you should create another module?
Comment #3
plopescGreat patch. Should be committed as soon as possible.
Regards
Comment #4
jherencia commentedRTBC, anyone?
Comment #5
lucascaro commentedawesomely simple. Works perfectly.
Comment #6
walker2238 commentedOne issue I have with this is when users use hook_element_info_alter() to alter the password confirm form.
How could the two work together since if you want to alter the password field (label or description for example) you need to use hook_element_info_alter() to create a MYFORM_form_process_password_confirm function.
For me your solution won't work because of this.
Comment #7
jherencia commented@walker2238 I don't see why could be any conflict. My aproach just removes the process function that adds the JS verification, any other module could add their own.
Comment #8
elBradford commentedThis works beautifully. I threw it in my template.php of my theme and avoided installing the module altogether. If this module isn't being maintained anymore this should at least go in the Drupal manual somewhere.
Comment #9
jherencia commentedWell I'm the new maintainer of this module and have just commited the patch:
http://drupalcode.org/project/disablepwstrength.git/commit/18322f5
I've activated the dev spanshot so in some hours it will be generated. I think is tested enough so I will create the 7.1 version tomorrow if nobody complains.
Thank you all for the reviewing.
Comment #10.0
(not verified) commentedWord missing.