/**
  * @param User $userModel
  */
 public function resetPassword(User $userModel)
 {
     $user = $this->getByUser($userModel);
     $apiUser = $user->getApiUser();
     $apiUser->setPassword($this->generateRandomSequence(16));
     $apiUser->deactivate();
     $apiUser->setDiamanteUser($user);
     $this->diamanteApiUserRepository->store($apiUser);
     $this->notifier->notifyByScenario('force_reset', $user, ['activation_hash' => $apiUser->getHash()]);
 }
 public function onUserNotification(UserEvent $event)
 {
     $this->manager->notifyByScenario($event->getScenario(), $event->getUser(), ['activation_hash' => $event->getUser()->getApiUser()->getHash()]);
 }