public function actionFieldlist($q = null)
    {
        if (!Yii::$app->request->isAjax) {
            return $this->redirect(['forum/index']);
        }
        return User::getMembersList($q);
    }
public function actionFieldlist($q = null)
    {
        if (!Yii::$app->request->isAjax) {
            return $this->redirect(['forum/index']);
        }
        return User::getMembersList($q);
    }
public function actionFieldlist ( $ q = null ) { if ( ! Yii :: $ app -> request -> isAjax ) { return $ this -> redirect ( [ 'forum/index' ] ) ; } return User :: getMembersList ( $ q ) ; }
Listing the active users for ajax.
@param string $q Username query
@return string|Response
Listing the active users for ajax .