code: public function newAction(Request $request, $hash)
      {
          $passwordHelper = $this->get('orkestra.application.helper.password');
          $hashedEntityHelper = $this->get('orkestra.application.helper.hashed_entity');
          $hashedEntity = $passwordHelper->lookup($hash);
          if (!$hashedEntity) {
              throw new EntityNotFoundException();
          }
          $user = $hashedEntity->getReferencedObject();
          $hashedEntityHelper->invalidate($hashedEntity);
  
          $em = $this->getDoctrine()->getManager();
          $em->persist($hashedEntity);
          $em->flush();
  
          if ($user) {
              $request->getSession()->set(PasswordSetController::CURRENT_USER_ID_KEY, $user->getId());
              $form = $this->getSetPasswordForm();
  
              return array(
                  'form' => $form->createView()
              );
          } else {
              throw $this->createNotFoundException('No user was found.');
          }
  
      }
docs: Displays a form to request a reset
  
  @Route("/set-password/{hash}", name="orkestra_password_set_new")
  @Template