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);
    }