src/mako/gatekeeper/adapters/Session.php
protected function authenticate($identifier, $password, $force = false)
	{
		$user = $this->userRepository->getByIdentifier($identifier);

		if($user !== false)
		{
			if($this->options['throttling']['enabled'] && $user->isLocked())
			{
				return Gatekeeper::LOGIN_LOCKED;
			}

			if($force || $user->validatePassword($password))
			{
				if(!$user->isActivated())
				{
					return Gatekeeper::LOGIN_ACTIVATING;
				}

				if($user->isBanned())
				{
					return Gatekeeper::LOGIN_BANNED;
				}

				if($this->options['throttling']['enabled'])
				{
					$user->resetThrottle();
				}

				$this->user = $user;

				return true;
			}
			else
			{
				if($this->options['throttling']['enabled'])
				{
					$user->throttle($this->options['throttling']['max_attempts'], $this->options['throttling']['lock_time']);
				}
			}
		}

		return Gatekeeper::LOGIN_INCORRECT;
	}
protected function authenticate($identifier, $password, $force = false)
	{
		$user = $this->userRepository->getByIdentifier($identifier);

		if($user !== false)
		{
			if($this->options['throttling']['enabled'] && $user->isLocked())
			{
				return Gatekeeper::LOGIN_LOCKED;
			}

			if($force || $user->validatePassword($password))
			{
				if(!$user->isActivated())
				{
					return Gatekeeper::LOGIN_ACTIVATING;
				}

				if($user->isBanned())
				{
					return Gatekeeper::LOGIN_BANNED;
				}

				if($this->options['throttling']['enabled'])
				{
					$user->resetThrottle();
				}

				$this->user = $user;

				return true;
			}
			else
			{
				if($this->options['throttling']['enabled'])
				{
					$user->throttle($this->options['throttling']['max_attempts'], $this->options['throttling']['lock_time']);
				}
			}
		}

		return Gatekeeper::LOGIN_INCORRECT;
	}
protected function authenticate ( $ identifier , $ password , $ force = false ) { $ user = $ this -> userRepository -> getByIdentifier ( $ identifier ) ; if ( $ user !== false ) { if ( $ this -> options [ 'throttling' ] [ 'enabled' ] && $ user -> isLocked ( ) ) { return Gatekeeper :: LOGIN_LOCKED ; } if ( $ force || $ user -> validatePassword ( $ password ) ) { if ( ! $ user -> isActivated ( ) ) { return Gatekeeper :: LOGIN_ACTIVATING ; } if ( $ user -> isBanned ( ) ) { return Gatekeeper :: LOGIN_BANNED ; } if ( $ this -> options [ 'throttling' ] [ 'enabled' ] ) { $ user -> resetThrottle ( ) ; } $ this -> user = $ user ; return true ; } else { if ( $ this -> options [ 'throttling' ] [ 'enabled' ] ) { $ user -> throttle ( $ this -> options [ 'throttling' ] [ 'max_attempts' ] , $ this -> options [ 'throttling' ] [ 'lock_time' ] ) ; } } } return Gatekeeper :: LOGIN_INCORRECT ; }
Returns true if the identifier + password combination matches and the user is activated, not locked and not banned.
A status code will be retured in all other situations.

@param  string   $identifier User email or username
@param  string   $password   User password
@param  bool     $force      Skip the password check?
@return bool|int
Returns true if the identifier + password combination matches and the user is activated not locked and not banned . A status code will be retured in all other situations .