diff options
Diffstat (limited to 'app/frontend/controls/AccountActivation.php')
-rw-r--r-- | app/frontend/controls/AccountActivation.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/frontend/controls/AccountActivation.php b/app/frontend/controls/AccountActivation.php new file mode 100644 index 0000000..f7b7f49 --- /dev/null +++ b/app/frontend/controls/AccountActivation.php @@ -0,0 +1,38 @@ +<?php + +Prado::using('Application.web.FacadeTemplateControl'); + +Prado::using('Application.facades.UserFacade'); + +class AccountActivation extends FacadeTemplateControl { + + private $_emailHash; + private $_activationHash; + + public function getEmail() { + return $this->_emailHash; + } + + public function setEmail($email) { + $this->_emailHash = TPropertyValue::ensureString($email); + } + + public function getHash() { + return $this->_activationHash; + } + + public function setHash($hash) { + $this->_activationHash = TPropertyValue::ensureString($hash); + } + + public function onPreRender($param) { + parent::onPreRender($param); + $this->SuccessLabel->Visible = $this->Facade->activateUser( + $this->Email, $this->Hash + ); + $this->ErrorLabel->Visible = !$this->SuccessLabel->Visible; + } + +} + +?> |