Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Security] [RFC] addind a new getUser() method to the SecurityContext class #8765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hhamon opened this issue Aug 15, 2013 · 1 comment
Closed

Comments

@hhamon
Copy link
Contributor

hhamon commented Aug 15, 2013

Hello,

How would you think adding a new getUser() method to the SecurityContext class?

I always find it boring to type $securityContext->getToken()->getUser() when getting the user. Having a shortcut method would be nicer.

Also it would simplify unit testing when mocking the SecurityContext object.

@fabpot
Copy link
Member

fabpot commented Aug 15, 2013

This was discussed a while ago and rejected, see #2816

@fabpot fabpot closed this as completed Aug 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants