diff options
author | Kris Wallsmith <kris.wallsmith@gmail.com> | 2011-12-08 08:53:01 -0800 |
---|---|---|
committer | Kris Wallsmith <kris.wallsmith@gmail.com> | 2011-12-08 08:53:01 -0800 |
commit | 571b855fb77836023b28fc3bfd5d5a3b8459e847 (patch) | |
tree | 5929eff8b929f7af11bb2f41055f81d25ec10b01 /Http/RememberMe/RememberMeServicesInterface.php | |
parent | 223aaf86a0173c799556c935afa9144d41c76fa2 (diff) | |
download | symfony-security-571b855fb77836023b28fc3bfd5d5a3b8459e847.zip symfony-security-571b855fb77836023b28fc3bfd5d5a3b8459e847.tar.gz symfony-security-571b855fb77836023b28fc3bfd5d5a3b8459e847.tar.bz2 |
[Security] added SecurityContextInterface::getUser()
This changes helps the common use case of fetching the current user and better complies with the Law of Demeter (http://en.wikipedia.org/wiki/Law_of_Demeter).
Before (still works):
$token = $context->getToken();
$user = $token ? $token->getUser() : null;
After:
$user = $context->getUser();
Diffstat (limited to 'Http/RememberMe/RememberMeServicesInterface.php')
0 files changed, 0 insertions, 0 deletions