public function PageLoad() { if ($this->page->ResettingPassword()) { $this->LoadValidators(); if ($this->page->IsValid()) { $user = $this->GetUser(); $password = $this->page->GetPassword(); $encrypted = $this->passwordEncryption->EncryptPassword($password); $user->ChangePassword($encrypted->EncryptedPassword(), $encrypted->Salt()); $this->userRepository->Update($user); $this->page->ShowResetPasswordSuccess(true); } } }
public function PageLoad() { $this->page->SetAllowedActions(PluginManager::Instance()->LoadAuthentication()); if ($this->page->ResettingPassword()) { $this->LoadValidators(); if ($this->page->IsValid()) { $user = $this->GetUser(); $password = $this->page->GetPassword(); $encrypted = $this->passwordEncryption->EncryptPassword($password); $user->ChangePassword($encrypted->EncryptedPassword(), $encrypted->Salt()); $this->userRepository->Update($user); $this->page->ShowResetPasswordSuccess(true); } } }