File tree Expand file tree Collapse file tree 5 files changed +27
-40
lines changed
phpMyFAQ/Controller/Frontend Expand file tree Collapse file tree 5 files changed +27
-40
lines changed Original file line number Diff line number Diff line change 5555 <label class =" form-check-label" for =" faqrememberme" >{{ rememberMe }}</label >
5656 </div >
5757 <div class =" d-flex align-items-center justify-content-between mt-4 mb-0" >
58- <a class =" small" href =" ./forgot-password" >{{ sendPassword }}</a >
58+ <a class =" small" href =" ./forgot-password" >{{ ' lostPassword ' | translate }}</a >
5959 <button type =" submit" class =" btn btn-primary" >{{ loginHeader }}</button >
6060 </div >
6161 </form >
Original file line number Diff line number Diff line change 1616 <div class =" col-6 offset-3" >
1717 <div class =" card shadow" >
1818 <div class =" card-header" >
19- <h4 class =" card-title " >{{ ' lostPassword' | translate }}</h4 >
19+ <h2 class =" text-center font-weight-light my-4 " >{{ ' lostPassword' | translate }}</h2 >
2020 </div >
2121 <div class =" card-body" >
2222 <form id =" pmf-password-form" action =" #" method =" post" accept-charset =" utf-8" class =" needs-validation"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -71,4 +71,24 @@ public function index(Request $request): Response
7171 'isWebAuthnEnabled ' => $ this ->configuration ->get ('security.enableWebAuthnSupport ' ),
7272 ]);
7373 }
74+
75+ /**
76+ * @throws Exception
77+ * @throws LoaderError
78+ * @throws \Exception
79+ */
80+ #[Route(path: '/forgot-password ' , name: 'public.forgot-password ' )]
81+ public function forgotPassword (Request $ request ): Response
82+ {
83+ $ faqSession = $ this ->container ->get ('phpmyfaq.user.session ' );
84+ $ faqSession ->setCurrentUser ($ this ->currentUser );
85+ $ faqSession ->userTracking ('forgot_password ' , 0 );
86+
87+ return $ this ->render ('password.twig ' , [
88+ ...$ this ->getHeader ($ request ),
89+ 'lang ' => $ this ->configuration ->getLanguage ()->getLanguage (),
90+ 'username ' => Translation::get (key: 'ad_auth_user ' ),
91+ 'password ' => Translation::get (key: 'ad_auth_passwd ' ),
92+ ]);
93+ }
7494}
Original file line number Diff line number Diff line change 3737 'controller ' => [ContactController::class, 'index ' ],
3838 'methods ' => 'GET|POST ' ,
3939 ],
40+ 'public.forgot-password ' => [
41+ 'path ' => '/forgot-password ' ,
42+ 'controller ' => [LoginController::class, 'forgotPassword ' ],
43+ 'methods ' => 'GET|POST ' ,
44+ ],
4045 'public.glossary ' => [
4146 'path ' => '/glossary.html ' ,
4247 'controller ' => [GlossaryController::class, 'index ' ],
You can’t perform that action at this time.
0 commit comments