Answer the question
In order to leave comments, you need to log in
How to fix Authorization Error?
one.
Argument 4 passed to Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken::__construct() must be of the type array, object given, called in /app/vendor/symfony/security-http/Authenticator/FormLoginAuthenticator.php on line 113
Answer the question
In order to leave comments, you need to log in
UserInterface implies that an array of strings (roles) will return
, either unbind your user from UserInterface (I did), or do as the interface requires
you need in the User entity:
public function getRoles():array
{
$ar=[];
foreach ($this->role as $rol) {
$ar[]=$rol->getCode();
}
return $ar;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question