Esempio 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);
         }
     }
 }
Esempio 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);
         }
     }
 }