/** * Save reset password. * * @param Request $request * @return \Symfony\Component\HttpFoundation\RedirectResponse */ public function saveResetAction(Request $request) { $data = $request->request->all(); $user = new User(); $user->loadByHash($data['hash']); if ($user->getId() && $data['password']) { $user->setPassword(md5($data['password'])); $user->save(); } return $this->redirectToRoute('lance_authorization'); }