protected function checkMethodForLoginRequired($method)
    {
        $isLoggedIn = $this->provider->isLoggedIn();
        $methodRequiresLogin = $this->provider->checkMethodRequiresLogin($method);

        if ($methodRequiresLogin && !$isLoggedIn) {
            $errorMessage = $this->getErrorMethodCallMessage($method, 'You must log in before.');
            throw new AuthRequired($errorMessage);
        }
    }
protected function checkMethodForLoginRequired($method)
    {
        $isLoggedIn = $this->provider->isLoggedIn();
        $methodRequiresLogin = $this->provider->checkMethodRequiresLogin($method);

        if ($methodRequiresLogin && !$isLoggedIn) {
            $errorMessage = $this->getErrorMethodCallMessage($method, 'You must log in before.');
            throw new AuthRequired($errorMessage);
        }
    }
protected function checkMethodForLoginRequired ( $ method ) { $ isLoggedIn = $ this -> provider -> isLoggedIn ( ) ; $ methodRequiresLogin = $ this -> provider -> checkMethodRequiresLogin ( $ method ) ; if ( $ methodRequiresLogin && ! $ isLoggedIn ) { $ errorMessage = $ this -> getErrorMethodCallMessage ( $ method , 'You must log in before.' ) ; throw new AuthRequired ( $ errorMessage ) ; } }
Checks if method requires login and if true,
checks logged in status.

@param $method

@throws AuthRequired if is not logged in
Checks if method requires login and if true checks logged in status .