Cartalyst\Sentinel\Users\IlluminateUserRepository::validateUser PHP Method

validateUser() protected method

Validates the user.
protected validateUser ( array $credentials, integer $id = null ) : boolean
$credentials array
$id integer
return boolean
    protected function validateUser(array $credentials, $id = null)
    {
        $instance = $this->createModel();
        $loginNames = $instance->getLoginNames();
        // We will simply parse credentials which checks logins and passwords
        list($logins, $password, $credentials) = $this->parseCredentials($credentials, $loginNames);
        if ($id === null) {
            if (empty($logins)) {
                throw new InvalidArgumentException('No [login] credential was passed.');
            }
            if (empty($password)) {
                throw new InvalidArgumentException('You have not passed a [password].');
            }
        }
        return true;
    }