protected function findModel($id)
    {
        /** @var \amnah\yii2\user\models\User $user */
        $user = $this->module->model("User");
        $user = $user::findOne($id);
        if ($user) {
            return $user;
        }

        throw new NotFoundHttpException('The requested page does not exist.');
    }
protected function findModel($id)
    {
        /** @var \amnah\yii2\user\models\User $user */
        $user = $this->module->model("User");
        $user = $user::findOne($id);
        if ($user) {
            return $user;
        }

        throw new NotFoundHttpException('The requested page does not exist.');
    }
protected function findModel ( $ id ) { /** @var \amnah\yii2\user\models\User $user */ $ user = $ this -> module -> model ( "User" ) ; $ user = $ user :: findOne ( $ id ) ; if ( $ user ) { return $ user ; } throw new NotFoundHttpException ( 'The requested page does not exist.' ) ; }
Find the User model based on its primary key value.
If the model is not found, a 404 HTTP exception will be thrown.
@param string $id
@return User the loaded model
@throws NotFoundHttpException if the model cannot be found
Find the User model based on its primary key value . If the model is not found a 404 HTTP exception will be thrown .