forked fromsymfony/symfony-docs
- Notifications
You must be signed in to change notification settings - Fork0
Commit18657aa
Piotr Strugacz
Update custom_password_authenticator.rst
Correct me if I am wrong... but because we are passing here ```username``` as first argument to ```UsernamePasswordToken```, when one would like to use method ```getUser()```: ```...if (!$this->container->has('security.context')) { throw new \LogicException('The SecurityBundle is not registered in your application.'); } if (null === $token = $this->container->get('security.context')->getToken()) { return null; } if (!is_object($user = $token->getUser())) { return null; } return $user;...```from base ```Controller```, it will fail, to get actually logged user and return null.1 parentbede4c3 commit18657aa
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments
Comments
(0)