Ejemplo n.º 1
0
 /**
  * Saves the user
  */
 protected function OnSuccess()
 {
     $action = $this->member->Exists() ? Action::Update() : Action::Create();
     $this->member->SetName($this->Value('Name'));
     $this->member->SetEMail($this->Value('EMail'));
     $this->SetPassword();
     $this->member->Save();
     $logger = new Logger(self::Guard()->GetUser());
     $logger->ReportMemberAction($thos->member, $action);
     if ($this->groupsExist && $this->CanAssignGroup()) {
         $this->SaveGroups();
     }
     Response::Redirect(BackendRouter::ModuleUrl(new MemberList()));
 }
Ejemplo n.º 2
0
 protected function OnSuccess()
 {
     $this->member = new Member();
     $this->member->SetEMail($this->Value('EMail'));
     $this->member->SetName($this->Value('Name'));
     $password = $this->Value('Password');
     $salt = String::Start(md5(uniqid(microtime())), 8);
     $pwHash = hash('sha256', $password . $salt);
     $this->member->SetPassword($pwHash);
     $this->member->SetPasswordSalt($salt);
     $this->member->SetCreated(Date::Now());
     $this->member->Save();
     $this->SendConfirmMail();
     if ($this->register->GetNextUrl()) {
         Response::Redirect(FrontendRouter::Url($this->register->GetNextUrl()));
     }
 }