/**
  * {@inheritDoc}
  */
 public function setPassword(array $data, UserRegistrationInterface $registrationRecord)
 {
     $newPass = $data['newCredential'];
     $user = $registrationRecord->getUser();
     $bcrypt = new Bcrypt();
     $bcrypt->setCost($this->getZfcUserOptions()->getPasswordCost());
     $pass = $bcrypt->create($newPass);
     $user->setPassword($pass);
     $this->getEventManager()->trigger(__FUNCTION__, $this, array('user' => $user, 'record' => $registrationRecord));
     $this->getUserMapper()->update($user);
     $registrationRecord->setResponded(UserRegistrationInterface::EMAIL_RESPONDED);
     $this->getUserRegistrationMapper()->update($registrationRecord);
     $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this, array('user' => $user, 'record' => $registrationRecord));
 }