/**
  * Save action
  *
  * @param \Evoweb\SfRegister\Domain\Model\Password $password
  * @return void
  * @validate $password Evoweb.SfRegister:User
  */
 public function saveAction(\Evoweb\SfRegister\Domain\Model\Password $password)
 {
     if (\Evoweb\SfRegister\Services\Login::isLoggedIn()) {
         $user = $this->userRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
         $this->signalSlotDispatcher->dispatch(__CLASS__, __FUNCTION__, array('user' => &$user, 'settings' => $this->settings));
         $user->setPassword($this->encryptPassword($password->getPassword(), $this->settings));
         $this->userRepository->update($user);
         $this->objectManager->get(\Evoweb\SfRegister\Services\Session::class)->remove('captchaWasValidPreviously');
     }
 }
 /**
  * @test
  * @return void
  */
 public function oldPasswordReturnsStringSetBySetPassword()
 {
     $expected = 'teststring';
     $this->fixture->setOldPassword($expected);
     $this->assertSame($expected, $this->fixture->getOldPassword());
 }