Exemplo n.º 1
0
 public function actionSendActivation()
 {
     $result = false;
     $user = new FUser();
     if (Yii::app()->request->isPostRequest) {
         $result = app()->XService->run('User/Account/sendActivation', $_POST);
         if ($result->ReturnCode !== ServiceResult::RETURN_SUCCESS) {
             ErrorHandler::logErrors($result->ErrorMessages);
             $user = $result->ReturnedData['User'];
         }
     }
     Yii::app()->layout = '';
     $this->render('SendAuthenticationEmail', array('user' => $user, 'result' => $result, 'action' => 'sendActivation'));
 }
Exemplo n.º 2
0
 public function actionSave()
 {
     //Make sure this action can be requested only by POST
     if ($this->IsPostBack) {
         // Check create a new article of edit an existing article
         $url = $this->createUrl('/BackOffice/admin/modules/edit', array('Id' => $this->post('Module[Id]')));
         $result = Cms::service('BackOffice/Module/update', $_POST);
         if ($result->ReturnCode == ServiceResult::RETURN_SUCCESS) {
             //create config file
             $this->initConfigCache();
             $moduleId = $this->post('Module[Id]', 0);
             if ($moduleId == 0) {
                 $this->message = Yii::t('Module', 'MODULE_CREATE_SUCCESSFUL');
             } else {
                 $this->message = Yii::t('Module', 'MODULE_UPDATE_SUCCESSFUL');
             }
         }
         // log error
         if ($result->ReturnCode != ServiceResult::RETURN_SUCCESS) {
             ErrorHandler::logErrors($result->ErrorMessages);
         }
         // redirect
         $this->redirect($url);
     } else {
         $this->redirect($this->createUrl('/BackOffice/admin/modules/all'));
     }
 }