private function OnSuccess() { $member = $this->confirmer->GetMember(); $member->SetConfirmed(Date::Now()); if ($this->confirm->GetActivate()) { $member->SetActive(true); } $member->Save(); $this->AddGroups($member); if ($this->confirm->GetSuccessUrl()) { Response::Redirect(FrontendRouter::Url($this->confirm->GetSuccessUrl())); } }
/** * Sets the confirm properties as given in the form * @return ContentRegisterConfirm */ protected function SaveElement() { $this->confirm->SetErrorUrl($this->selectorError->Save($this->confirm->GetErrorUrl())); $this->confirm->SetSuccessUrl($this->selectorSuccess->Save($this->confirm->GetSuccessUrl())); $this->confirm->SetActivate((bool) $this->Value('Activate')); return $this->confirm; }