public static function getOnlineUsers() { $p = (int) CMS\Option::get(CMS_Bazalt::ONLINEPERIOD_OPTION, 5); $q = User::select()->where('last_activity BETWEEN ? AND ?', array(date('Y-m-d H:i:s', strtotime('now -' . $p . ' minutes')), date('Y-m-d H:i:s', strtotime('now +' . $p . ' minutes'))))->noCache(); return $q->fetchAll(); }