src/Security/Authentication.php
public function handleAttempt($executeNow, $username, $password, $toRoute)
    {
        if ($executeNow) {
            try {
                if ($this->attempt($username, $password)) {
                    Base::instance()->reroute($toRoute);
                }
            } catch (Exception $e) {
                return $e->getMessage();
            }
        }

        return null;
    }
public function handleAttempt($executeNow, $username, $password, $toRoute)
    {
        if ($executeNow) {
            try {
                if ($this->attempt($username, $password)) {
                    Base::instance()->reroute($toRoute);
                }
            } catch (Exception $e) {
                return $e->getMessage();
            }
        }

        return null;
    }
public function handleAttempt ( $ executeNow , $ username , $ password , $ toRoute ) { if ( $ executeNow ) { try { if ( $ this -> attempt ( $ username , $ password ) ) { Base :: instance ( ) -> reroute ( $ toRoute ) ; } } catch ( Exception $ e ) { return $ e -> getMessage ( ) ; } } return null ; }
Handle authentication attempt
@param  bool $executeNow should we execute now?
@param  string $username
@param  string $password
@param  string $toRoute    redirect to this route on success
@return string|null        error message
Handle authentication attempt