public function run()
 {
     $users = ActiveUser::find()->limit((int) Setting::Get('noUsers', 'mostactiveusers'))->all();
     if (count($users) == 0) {
         return;
     }
     return $this->render('sidebar', array('users' => $users));
 }
 /**
  * Shows list of most active users with statistic.
  */
 public function actionList()
 {
     $query = \humhub\modules\mostactiveusers\models\ActiveUser::find();
     $countQuery = clone $query;
     $pagination = new \yii\data\Pagination(['totalCount' => $countQuery->count(), 'pageSize' => $this->pageSize]);
     $query->offset($pagination->offset)->limit($pagination->limit);
     return $this->renderAjax('list', ['users' => $query->all(), 'pagination' => $pagination]);
 }