public function actionSettings() { // Find Model $user = Yii::$app->user->getIdentity(); // Update/Render if exist if (isset($user)) { $privacy = UserService::findAttributeMapByType($user, WebGlobalCore::SETTINGS_PRIVACY); $notification = UserService::findAttributeMapByType($user, WebGlobalCore::SETTINGS_NOTIFICATION); $reminder = UserService::findAttributeMapByType($user, WebGlobalCore::SETTINGS_REMINDER); return $this->render(WebGlobalCore::PAGE_SETTINGS, ['user' => $user, 'privacy' => $privacy, 'notification' => $notification, 'reminder' => $reminder]); } // Model not found throw new NotFoundHttpException(Yii::$app->cmgCoreMessage->getMessage(CoreGlobal::ERROR_NOT_FOUND)); }