original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: 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.
docstring_tokens: Authenticates the user and if successful initializes an authenticated session .