function user_load_by_mail
Same name in other branches
- 9 core/modules/user/user.module \user_load_by_mail()
- 8.9.x core/modules/user/user.module \user_load_by_mail()
- 10 core/modules/user/user.module \user_load_by_mail()
- 11.x core/modules/user/user.module \user_load_by_mail()
Fetch a user object by email address.
Parameters
$mail: String with the account's e-mail address.
Return value
A fully-loaded $user object upon successful user load or FALSE if user cannot be loaded.
See also
2 calls to user_load_by_mail()
- system_send_email_action in modules/
system/ system.module - Sends an e-mail message.
- _update_cron_notify in modules/
update/ update.fetch.inc - Performs any notifications that should be done once cron fetches new data.
File
-
modules/
user/ user.module, line 381
Code
function user_load_by_mail($mail) {
$users = user_load_multiple(array(), array(
'mail' => $mail,
));
return reset($users);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.