Exemple #1
0
 public static function updated($user)
 {
     $query = ForumPost::none();
     if (!$user->is_anonymous()) {
         $query->where("creator_id <> " . $user->id);
     }
     $newest_topic = $query->order("id desc")->limit(1)->select("created_at")->first();
     if (!$newest_topic) {
         return false;
     }
     return $newest_topic->created_at > $user->last_forum_topic_read_at;
 }