Le 16/06/2011 11:48, winzou a écrit :
I extend the UserManager (which implements UserProviderInterface) because I don't want to write a new one from scratch, as it perfectly fits my needs. I may have been not so clear: my point is to use the UserManager of FOS, but with just a little modification of the findUserByUsername() method.

Inject it in my own user provider instead of extending it seems cool, but I should write a __call() method to be able to use a $myUserProvider->aFOSUserManagerMethod(), and I don't really like it.

The UserProviderInterface has only 3 methods which are really simple to implement. Currently, you are creating your own service to use it as user provider but passing it all parameters passed to the FOSUB UserManager which would make your code broken if we change the constructor arguments of the UserManager (which is absolutely not meant to stay BC after a release of the bundle as it is handled by our own code, not by user-land code).

It seems like you confuse what the UserProviderInterface is and what the UserManager is.

--
Christophe | Stof

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to