Index: ldapauth.module
===================================================================
180a181
> # PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected
183a185
> /*
187a190,191
> */
> # PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected END
207c211,212
<     case 'user_login_block':
---
>   	# PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected
>     /*case 'user_login_block':
210c215,216
<       break;
---
>       break;*/
>   	# PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected END
236a243,267
> # PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected
> // Alter the request new password form
> function ldapauth_form_user_pass_alter(&$form, &$form_state) {
> 	
> 	if (LDAPAUTH_DISABLE_PASS_CHANGE){
> 		// Add your own function to the array of validation callbacks
> 		$form['#validate'][] = 'ldapauth_user_pass';
> 	}
> 	
> }
> 
> function ldapauth_user_pass($form, &$form_state) {
> 	
> 	if (isset($form_state['values']['account']) && !empty($form_state['values']['account'])) {
> 		$account = $form_state['values']['account'];
> 
> 		if (isset($account->ldap_authentified)) {
> 			form_set_error('name', t("This is an LDAP account, to change or retrieve the password, please, contact your LDAP administrator"));
> 			unset($form_state['values']['account']);
> 		}
> 	}
> 
> }
> # PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected END
> 
Index: ldapauth.admin.inc
===================================================================
137a138
>   # PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected
139c140,141
<   menu_rebuild();
---
>   //menu_rebuild();
>   # PB:09022011 allow the request of new password for non LDAP users also with  LDAPAUTH_DISABLE_PASS_CHANGE option selected END
