예제 #1
0
 /**
  *
  * @param Command $command
  */
 private function savePassword(Command $command)
 {
     $hash = $command->entity()->getPassword();
     if (!HashPass::verifyPassword($this->http->request->get('userPassword'), $hash)) {
         Server::setReferData(['error' => ['validPassword' => 1]]);
         Server::headerLocationReferer();
     } else {
         $command->setPassword($this->http->request->get('userNewPassword'))->update(['password' => []]);
     }
 }
예제 #2
0
 /**
  *
  * @param Command $command
  */
 private function updatePassword(Command $command)
 {
     $command->setPassword($this->randomPassword)->update(['password' => []]);
 }