Fetches a user object by account name.
string $name: String with the account's user name.
object|bool A fully-loaded $user object upon successful user load or FALSE if user cannot be loaded.
function user_load_by_name($name) {
$users = entity_load_multiple_by_properties('user', array(
'name' => $name,
));
return $users ? reset($users)
->getBCEntity() : FALSE;
}