while upgrading to symfony 6.1
This commit is contained in:
@@ -27,8 +27,9 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator
|
||||
use TargetPathTrait;
|
||||
|
||||
public function __construct(private readonly UserRepository $userRepository, private readonly RouterInterface $router)
|
||||
{
|
||||
}
|
||||
{
|
||||
// empty body
|
||||
}
|
||||
|
||||
public function authenticate(Request $request): Passport
|
||||
{
|
||||
@@ -38,7 +39,8 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator
|
||||
|
||||
$request->getSession()->set(name: Security::LAST_USERNAME, value: $username);
|
||||
|
||||
|
||||
dd("here");
|
||||
|
||||
return new Passport(
|
||||
userBadge: new UserBadge(userIdentifier: $username, userLoader: function ($userIdentifier) {
|
||||
$user = $this->userRepository->findOneBy(['username' => $userIdentifier]);
|
||||
|
||||
Reference in New Issue
Block a user