diff --git a/dbee.module b/dbee.module index fe5d5fe..c681a4d 100644 --- a/dbee.module +++ b/dbee.module @@ -653,6 +653,17 @@ function dbee_form_user_login_block_alter(&$form, &$form_state, $form_id) { } /** + * Implements hook_form_FORM_ID_alter(). + * + * Fix password reset. + */ +function dbee_form_user_pass_alter(&$form, &$form_state, $form_id) { + if (variable_get('dbee_loggin_email', 0)) { + $form['name']['#element_validate'][] = 'dbee_user_login_validate'; + } +} + +/** * Allow to login using email address instead of the username. * * Allow to login using either the email address or the username, instead of