original_string: public function logCurrentUserLastSeenTime()
      {
          $module = Common::getRequestVar('module', false);
          $currentUserLogin = Piwik::getCurrentUserLogin();
  
          // only log time for non-anonymous visits to the reporting UI
          if ($module == 'API'
              || $module == 'Proxy'
              || Piwik::isUserIsAnonymous()
          ) {
              return;
          }
  
          // get the last known time
          $optionName = self::OPTION_PREFIX . $currentUserLogin;
          $lastSeen = Option::get($optionName);
  
          // do not log if last known time is less than N minutes from now (so we don't make too many
          // queries)
          if (time() - $lastSeen <= self::LAST_TIME_SAVE_DELTA) {
              return;
          }
  
          // log last seen time (Note: autoload is important so the Option::get above does not result in
          // a separate query)
          Option::set($optionName, time(), $autoload = 1);
      }
code: public function logCurrentUserLastSeenTime()
      {
          $module = Common::getRequestVar('module', false);
          $currentUserLogin = Piwik::getCurrentUserLogin();
  
          // only log time for non-anonymous visits to the reporting UI
          if ($module == 'API'
              || $module == 'Proxy'
              || Piwik::isUserIsAnonymous()
          ) {
              return;
          }
  
          // get the last known time
          $optionName = self::OPTION_PREFIX . $currentUserLogin;
          $lastSeen = Option::get($optionName);
  
          // do not log if last known time is less than N minutes from now (so we don't make too many
          // queries)
          if (time() - $lastSeen <= self::LAST_TIME_SAVE_DELTA) {
              return;
          }
  
          // log last seen time (Note: autoload is important so the Option::get above does not result in
          // a separate query)
          Option::set($optionName, time(), $autoload = 1);
      }
code_tokens: public function logCurrentUserLastSeenTime ( ) { $ module = Common :: getRequestVar ( 'module' , false ) ; $ currentUserLogin = Piwik :: getCurrentUserLogin ( ) ; // only log time for non-anonymous visits to the reporting UI if ( $ module == 'API' || $ module == 'Proxy' || Piwik :: isUserIsAnonymous ( ) ) { return ; } // get the last known time $ optionName = self :: OPTION_PREFIX . $ currentUserLogin ; $ lastSeen = Option :: get ( $ optionName ) ; // do not log if last known time is less than N minutes from now (so we don't make too many // queries) if ( time ( ) - $ lastSeen <= self :: LAST_TIME_SAVE_DELTA ) { return ; } // log last seen time (Note: autoload is important so the Option::get above does not result in // a separate query) Option :: set ( $ optionName , time ( ) , $ autoload = 1 ) ; }
docstring: Saves the current time for a user as an option if the current request is for something
  in the reporting UI, the current user is not anonymous and the time hasn't been saved
  in the last 5 minutes.
docstring_tokens: Saves the current time for a user as an option if the current request is for something in the reporting UI the current user is not anonymous and the time hasn t been saved in the last 5 minutes .