Example #1
0
 /**
  * Saves the area
  */
 protected function OnSuccess()
 {
     $action = $this->user->Exists() ? Action::Update() : Action::Create();
     $this->user->SetName($this->Value('Name'));
     $this->user->SetEMail($this->Value('EMail'));
     $this->user->SetLanguage(new Language($this->Value('Language')));
     if ($this->CanChangeIsAdmin()) {
         $this->user->SetIsAdmin((bool) $this->Value('IsAdmin'));
     }
     $this->SavePassword();
     $this->user->Save();
     $logger = new Logger(self::Guard()->GetUser());
     $logger->ReportUserAction($this->user, $action);
     Response::Redirect(BackendRouter::ModuleUrl(new UserList()));
 }