public function initSession(AuthInterface $auth)
    {
        $this->regenerateSessionId();

        $authResult = $this->doAuthenticateSession($auth);

        if (!$authResult->wasAuthenticationSuccessful()) {

            Piwik::postEvent('Login.authenticate.failed', array($auth->getLogin()));

            $this->processFailedSession();
        } else {

            Piwik::postEvent('Login.authenticate.successful', array($auth->getLogin()));

            $this->processSuccessfulSession($authResult);
        }
    }
public function initSession(AuthInterface $auth)
    {
        $this->regenerateSessionId();

        $authResult = $this->doAuthenticateSession($auth);

        if (!$authResult->wasAuthenticationSuccessful()) {

            Piwik::postEvent('Login.authenticate.failed', array($auth->getLogin()));

            $this->processFailedSession();
        } else {

            Piwik::postEvent('Login.authenticate.successful', array($auth->getLogin()));

            $this->processSuccessfulSession($authResult);
        }
    }
public function initSession ( AuthInterface $ auth ) { $ this -> regenerateSessionId ( ) ; $ authResult = $ this -> doAuthenticateSession ( $ auth ) ; if ( ! $ authResult -> wasAuthenticationSuccessful ( ) ) { Piwik :: postEvent ( 'Login.authenticate.failed' , array ( $ auth -> getLogin ( ) ) ) ; $ this -> processFailedSession ( ) ; } else { Piwik :: postEvent ( 'Login.authenticate.successful' , array ( $ auth -> getLogin ( ) ) ) ; $ this -> processSuccessfulSession ( $ authResult ) ; } }
Authenticates the user and, if successful, initializes an authenticated session.

@param \Piwik\Auth $auth The Auth implementation to use.
@throws Exception If authentication fails or the user is not allowed to login for some reason.
Authenticates the user and if successful initializes an authenticated session .