--- passwordless.module.orig	2014-01-29 03:47:14.000000000 -0600
+++ passwordless.module	2014-06-04 08:47:20.000000000 -0500
@@ -192,8 +192,37 @@
 // Removed load-by-name code
 function passwordless_login_validate($form, &$form_state) {
   $name = trim($form_state['values']['name']);
-  // Try to load by email.
-  $users = user_load_multiple(array(), array('mail' => $name, 'status' => '1'));
+
+  // If the multiple_email module is installed, use it to locate the user account.
+  if( module_exists('multiple_email')) {
+    $users = multiple_email_find_address($name);
+
+    if( $users && isset($users->uid) && $users->confirm_code = 1 )
+    {
+      // Ensure we are using an e-mail address stored in the database.
+      $name = $users->email;
+
+      // Load the user by UID
+      $users = user_load_multiple(array(), array('uid' => $users->uid, 'status' => '1'));
+
+      // Safety: We don't want to accidentally log multiple accounts in.
+      if( count($users) > 1 )
+        unset($users);
+
+      // Patch the temporary record with the e-mail address from multiple_email
+      foreach( $users as $user ) {
+        $user->mail = $name;
+      }
+
+    }
+
+  // Use standard Drupal account information.
+  } else {
+
+    // Try to load by email.
+    $users = user_load_multiple(array(), array('mail' => $name, 'status' => '1'));
+  }
+
   $account = reset($users);
   if (isset($account->uid)) {
     form_set_value(array('#parents' => array('account')), $account, $form_state);
