Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #3478 Update custom_password_authenticator.rst (piotras-s)
This PR was merged into the 2.4 branch. Discussion ---------- 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()``` from base ```Controller```: ``` ... 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; ... ``` it will fail to get actually logged in user and return null. Commits ------- 18657aa Update custom_password_authenticator.rst
- Loading branch information