/** * Executes the widgets */ public function run() { // Some member stats $statsTotalUsers = User::find()->active()->count(); $statsUserOnline = \humhub\modules\user\components\Session::getOnlineUsers()->count(); $statsUserFollow = Follow::find()->where(['object_model' => User::className()])->count(); $statsUserInMostSpaces = Membership::GetUserInMostSpaces(); // Render widgets view return $this->render('memberStats', array('statsTotalUsers' => $statsTotalUsers, 'statsUserOnline' => $statsUserOnline, 'statsUserFollow' => $statsUserFollow, 'statsUserInMostSpaces' => $statsUserInMostSpaces)); }