Commit 43aff910 authored by Cyprien's avatar Cyprien
Browse files

Merge branch 'LoginForm' of...

Merge branch 'LoginForm' of https://forge.info.unicaen.fr/git/but-info-sae3-2024-groupe3 into LoginForm
parents 2aa00a4c b44e9be6
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -7,11 +7,16 @@
    <title>Document</title>
</head>
<body>
    @if ($user->checkPassword('securepassword'))
        <p>Match</p>
        <p> {{$user->hasRoles('SEC')}} </p>
    @if($user->roles->isNotEmpty())
    <p>Roles:</p>
    <ul>
        @foreach($user->roles as $role)
            <li>{{ $role->ROL_LABEL }}</li>
        @endforeach
    </ul>
    @else
        <p>Unmatch</p>
        <p>Cet utilisateur n'a aucun rôle.</p>
    @endif

</body>
</html>
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@
    ]);

    $user = User::where('US_EMAIL', $request->mail)->first();
    if($user == null)
    {
        return view('login', ['wrongPassword' => true]);
    }
    if($user->checkPassword($request->password))
    {
        return redirect('/'); // TODO: Redirect to the user's hub page