Sentinel\Repositories\User\SentryUserRepository::validateCredentials PHP Method

validateCredentials() public method

Validate a user against the given credentials.
public validateCredentials ( Illuminate\Contracts\Auth\Authenticatable $user, array $credentials ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
$credentials array
return boolean
    public function validateCredentials(Authenticatable $user, array $credentials)
    {
        if (isset($credentials['email']) && $credentials['email'] != $user->email) {
            return false;
        }
        if (isset($credentials['username']) && $credentials['username'] != $user->username) {
            return false;
        }
        return $user->checkPassword($credentials['password']);
    }