fix: enforce profile completion of applicant in all situations
This commit is contained in:
@@ -5,8 +5,6 @@ declare(strict_types=1);
|
||||
namespace App\Controller\Booking\Create;
|
||||
|
||||
use App\BusProNet\XmlLoader\AgencyLoader;
|
||||
use App\Controller\Account\PersonalDataController;
|
||||
use App\Entity\User;
|
||||
use App\Exception\HotelNotFoundException;
|
||||
use App\Exception\HotelNotInTravelException;
|
||||
use App\Exception\NoRoomsAvailableException;
|
||||
@@ -44,7 +42,6 @@ class IndexController extends AbstractController
|
||||
*
|
||||
* Renders a loading page that triggers the actual initialization via HTMX.
|
||||
* This provides immediate visual feedback while BusProNet API calls are made.
|
||||
* Redirects to profile completion if logged-in user has incomplete profile data.
|
||||
*/
|
||||
#[Route(
|
||||
path: '/bookings/create',
|
||||
@@ -56,14 +53,6 @@ class IndexController extends AbstractController
|
||||
throw $this->createNotFoundException('Invalid booking parameters provided');
|
||||
}
|
||||
|
||||
$user = $this->getUser();
|
||||
|
||||
if ($user instanceof User && false === $user->isProfileComplete()) {
|
||||
$request->getSession()->set(PersonalDataController::SESSION_REDIRECT_KEY, $request->getUri());
|
||||
|
||||
return $this->redirectToRoute('app_personal_data');
|
||||
}
|
||||
|
||||
return $this->render('booking/create/index.html.twig', [
|
||||
'params' => $params,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user