Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 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);
         }
     }
 }