Esempio n. 1
0
 public function actionUpdateSettings()
 {
     $settingsArray = $directionsArray = Yii::$app->request->post('settings');
     $currentPsychologistId = Yii::$app->user->id;
     $userModules = new UsersModules();
     if ($userModules->setNewUserSettings($currentPsychologistId, $settingsArray)) {
         return $this->redirect('index');
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Esempio n. 2
0
 public function init()
 {
     $this->layout = 'client_layout';
     $imagesModel = new Image();
     $this->logo = $imagesModel->getProfilePhoto();
     $profile = $this->findModel(Yii::$app->user->id);
     $this->first_name = $profile->firstname;
     $this->last_name = $profile->lastname;
     $this->userModules = UsersModules::getUsersModules();
     parent::init();
     // custom initialization code goes here
 }
Esempio n. 3
0
 private function deleteUserSettings($psychologistId)
 {
     return UsersModules::deleteAll('user_id = ' . $psychologistId);
 }