MDL-90 authenticate_user_login() - don't accidentally return a bogus $user

While I don't quite understand why we need that $user->id=0, at
_least_ make double sure we don't return it! Callers assume
that if we return an object===success and a user acct that just does
not exist will return an dummy object.
This commit is contained in:
martinlanghoff 2008-02-27 02:56:48 +00:00
parent a4c371ece6
commit a668c80845

View file

@ -3059,8 +3059,10 @@ function authenticate_user_login($username, $password) {
} }
} }
if ($user->id===0) {
return false;
}
return $user; return $user;
} }
// failed if all the plugins have failed // failed if all the plugins have failed