diff options
author | emkael <emkael@tlen.pl> | 2016-05-06 15:40:50 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-05-06 15:40:50 +0200 |
commit | a43e887c380fc414121792658136a34051526b6a (patch) | |
tree | 1816ec713671d02dd3d24e92c2f4675f7deab30d /app/php/controls/PasswordChange.php | |
parent | 5bfe174b5907440a4f08bd45fd9c384ab5c58037 (diff) |
* DbUser refactored to use a facade
Diffstat (limited to 'app/php/controls/PasswordChange.php')
-rw-r--r-- | app/php/controls/PasswordChange.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/php/controls/PasswordChange.php b/app/php/controls/PasswordChange.php index 7c177a6..0f0300c 100644 --- a/app/php/controls/PasswordChange.php +++ b/app/php/controls/PasswordChange.php @@ -3,6 +3,7 @@ Prado::using('Application.web.FacadeTemplateControl'); Prado::using('Application.user.DbUser'); +Prado::using('Application.facades.UserFacade'); class PasswordChange extends FacadeTemplateControl { @@ -20,15 +21,16 @@ class PasswordChange extends FacadeTemplateControl { } public function checkPassword($sender, $param) { - $param->IsValid = DbUser::verifyPassword( - $this->Password->Text, $this->UserToChange->getPassword() + $param->IsValid = $this->getFacade()->verifyUserPassword( + $this->Password->Text, $this->UserToChange ); } public function changePassword($sender, $param) { $this->SuccessMessage->Visible = FALSE; if ($this->Page->IsValid) { - $this->UserToChange->changePassword( + $this->getFacade()->changePassword( + $this->UserToChange, $this->NewPassword->Text ); $this->SuccessMessage->Visible = TRUE; |