Exemplo n.º 1
0
 public function updateActivityStamp($userId)
 {
     if (!$userId) {
         return;
     }
     $user = $this->userDao->findById((int) $userId);
     if ($user === null) {
         return;
     }
     $activityStamp = time();
     $userOnline = $this->userOnlineDao->findByUserId($userId);
     if ($userOnline === null) {
         $userOnline = new BOL_UserOnline();
         $userOnline->setUserId($userId);
     }
     $userOnline->setActivityStamp($activityStamp);
     $this->userOnlineDao->saveDelayed($userOnline);
     /* @var $user BOL_User */
     $user->setActivityStamp($activityStamp);
     $this->userDao->saveDelayed($user);
 }