mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Implemented some messages
This commit is contained in:
		| @@ -6,6 +6,9 @@ use Symfony\Component\HttpFoundation\Response; | ||||
| use Symfony\Component\Routing\Annotation\Route; | ||||
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
| use Symfony\Component\Translation\TranslatorInterface; | ||||
| use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use App\Entity\User; | ||||
|  | ||||
| /** | ||||
|  * | ||||
| @@ -23,13 +26,13 @@ class SecurityController extends AbstractController | ||||
|         $error = $authenticationUtils->getLastAuthenticationError(); | ||||
|         if ($error) { | ||||
|             $this->addFlash('danger', $error->getMessage()); | ||||
|             #$this->addFlash('info', $translator->trans('Code:%code%',['%code%'=>$error->getMessageKey()])); | ||||
|         }else{ | ||||
|             $lastUsername = $authenticationUtils->getLastUsername(); | ||||
|             if($lastUsername){ | ||||
|                 $this->addFlash('success', $translator->trans('User %user% loged in.',['user'=>$lastUsername])); | ||||
|                 $this->addFlash('success', $translator->trans('User %user% loged in.',['%user%'=>$lastUsername])); | ||||
|             } | ||||
|         } | ||||
|         $this->addFlash('info', $authenticationUtils->getLastUsername()); | ||||
|         return $this->render("user/login.html.twig",[ | ||||
|             'last_username'=>$authenticationUtils->getLastUsername(), | ||||
|         ]); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user