コード例 #1
0
 public function clean($ttl)
 {
     $users = SessionDAO::create()->getObsoleteUserIds(DbQueryHelper::timestamp2date(time() - $ttl));
     if (!empty($users)) {
         SessionDAO::create()->dropByUserIdList($users);
         PropertiesDAO::create()->dropByUserIdList($users);
         UserBlacklistDAO::create()->dropByUserIdList($users);
         UserNotesDAO::create()->dropByUserIdList($users);
         UserDAO::create()->dropByUserIdList($users);
     }
 }
コード例 #2
0
ファイル: UserDAO.php プロジェクト: jackblackjack/sociochat
 /**
  * @return UserNotesDAO|null
  */
 public function getUserNotes()
 {
     if (!$this[self::NOTES] && $this->getId()) {
         $this[self::NOTES] = UserNotesDAO::create()->getByUserId($this->getId());
     }
     return $this[self::NOTES];
 }