diff --git a/cookbook/security/custom_password_authenticator.rst b/cookbook/security/custom_password_authenticator.rst index 751beef449c..890c290eae2 100644 --- a/cookbook/security/custom_password_authenticator.rst +++ b/cookbook/security/custom_password_authenticator.rst @@ -66,7 +66,7 @@ the user:: } return new UsernamePasswordToken( - $user->getUsername(), + $user, $user->getPassword(), $providerKey, $user->getRoles()