By chaloum on
if you use user_load_by_mail() and the user isn't found does the system still load the entire user object to find the user or is the user object only loaded if (after) the user is found?
thanks
if you use user_load_by_mail() and the user isn't found does the system still load the entire user object to find the user or is the user object only loaded if (after) the user is found?
thanks
Comments
API page
Hi Chaloum,
On the API page for the function:
http://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_load_by_mail/7
it says:
Return value
A fully-loaded $user object upon successful user load or FALSE if user cannot be loaded.
Cheers
Tom
There isn't an object to load
There isn't an object to load if the user doesn't exist (aka "isn't found").
Contact me to contract me for D7 -> D10/11 migrations.