progress in auth part
This commit is contained in:
parent
29b49d397d
commit
9a67d736dc
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
namespace App\Controller\Auth;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Form\RegistrationFormType;
|
||||
use App\Form\Auth\RegistrationFormType;
|
||||
use App\Repository\UserRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
|
@ -38,7 +38,7 @@ class RegistrationController extends AbstractController
|
|||
$existingUser = $userRepository->findByEmail($user->getEmail());
|
||||
if ($existingUser) {
|
||||
$this->addFlash('error', 'این ایمیل قبلاً ثبت شده است');
|
||||
return $this->render('registration/register.html.twig', [
|
||||
return $this->render('auth/registration/register.html.twig', [
|
||||
'registrationForm' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ class RegistrationController extends AbstractController
|
|||
$existingUser = $userRepository->findByMobile($user->getMobile());
|
||||
if ($existingUser) {
|
||||
$this->addFlash('error', 'این شماره موبایل قبلاً ثبت شده است');
|
||||
return $this->render('registration/register.html.twig', [
|
||||
return $this->render('auth/registration/register.html.twig', [
|
||||
'registrationForm' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ class RegistrationController extends AbstractController
|
|||
return $this->redirectToRoute('app_login');
|
||||
}
|
||||
|
||||
return $this->render('registration/register.html.twig', [
|
||||
return $this->render('auth/registration/register.html.twig', [
|
||||
'registrationForm' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
namespace App\Controller\Auth;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Form\ChangePasswordFormType;
|
||||
use App\Form\ResetPasswordRequestFormType;
|
||||
use App\Form\Auth\ChangePasswordFormType;
|
||||
use App\Form\Auth\ResetPasswordRequestFormType;
|
||||
use App\Repository\UserRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
|
||||
|
|
@ -42,7 +42,7 @@ class ResetPasswordController extends AbstractController
|
|||
);
|
||||
}
|
||||
|
||||
return $this->render('reset_password/request.html.twig', [
|
||||
return $this->render('auth/reset_password/request.html.twig', [
|
||||
'requestForm' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ class ResetPasswordController extends AbstractController
|
|||
public function checkEmail(): Response
|
||||
{
|
||||
// این صفحه فقط برای نمایش پیام استفاده میشود
|
||||
return $this->render('reset_password/check_email.html.twig');
|
||||
return $this->render('auth/reset_password/check_email.html.twig');
|
||||
}
|
||||
|
||||
#[Route('/reset/{token}', name: 'app_reset_password')]
|
||||
|
|
@ -85,7 +85,7 @@ class ResetPasswordController extends AbstractController
|
|||
return $this->redirectToRoute('app_login');
|
||||
}
|
||||
|
||||
return $this->render('reset_password/reset.html.twig', [
|
||||
return $this->render('auth/reset_password/reset.html.twig', [
|
||||
'resetForm' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
namespace App\Controller\Auth;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
|
@ -20,7 +20,7 @@ class SecurityController extends AbstractController
|
|||
$error = $authenticationUtils->getLastAuthenticationError();
|
||||
$lastUsername = $authenticationUtils->getLastUsername();
|
||||
|
||||
return $this->render('security/login.html.twig', [
|
||||
return $this->render('auth/security/login.html.twig', [
|
||||
'last_username' => $lastUsername,
|
||||
'error' => $error,
|
||||
]);
|
||||
Loading…
Reference in a new issue