コード例 #1
0
ファイル: UserForm.php プロジェクト: agentmedia/phine-core
 /**
  * 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()));
 }
コード例 #2
0
ファイル: UserList.php プロジェクト: agentmedia/phine-core
 protected function BeforeRemove(TableObject $deleteObject)
 {
     $logger = new Logger(self::Guard()->GetUser());
     $logger->ReportUserAction($deleteObject, Action::Delete());
 }