First - the module is great!

It seems that Drupal-8 will allow log in with either username or email address. It would be terrific if this functionality could be added to this module. Super Login (https://www.drupal.org/project/super_login) has the code but it doesn't work correctly when a site is in maintenance mode and it lacks the style of this module. Is there a way for you to add log in options (username, email address, either) to this module in Drupal version 7?

Comments

joemaine created an issue.

joemaine’s picture

I found a sandbox project at https://www.drupal.org/sandbox/hefox/1359748
https://www.drupal.org/commitlog/commit/30816/21448190130128f8ff14da7bce...

This is a "module" (Login Email) that allows a user to log in with either their username or email address. It works with Drop Down Login (Email Registration doesn't work with DD Login, and Login Toboggan just seemed too heavy for email only). It would be very cool if this code could be incorporated into DD Login.

nashkrammer’s picture

Hi Joemaine,
As for your request to have user or email for login, I suggest best module to use is loginToboggan , Drupal being modular and loginToboggan is actively maintained it is always recommended to use contributed modules that have high number of downloads. I am sure loginToboggan is widely used module and it is optimized for any project and drop down login is only focused on UI/UX more than backend features.

Regards,

nayanalok’s picture

Here is the great module to login with username and email Login Email or Username

Install this module and enable it and you will be able to login with email address.

If you are using dropdown login you need to add following code into 'login_emailusername.module' file, so that email login through user login block will also work.


/**
 * Implements hook_form_FORM_ID_alter(). for user login block form
 */
function login_emailusername_form_user_login_block_alter(&$form, &$form_state, $form_id) {

  $form['name']['#title'] = t('Username or email address.');
  $form['name']['#description'] = t('Enter your username or email address');
  $form['name']['#element_validate'][] = 'login_emailusername_user_login_validate';
}