Skip to content
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

using the create_user method in the UserFactoryUnterface implemented. #58

Open
William12345 opened this issue Feb 1, 2014 · 1 comment

Comments

@William12345
Copy link

Hello,

I have not an user table in my project and the authentification is simple done with the cas server. I used an user provider which implements the UserFactoryInterface to run the create_user function.
So, first of all, is it the best way to autenticate a user without an user provider like an user table ?
If it is true, then, i return in the loaduserbyusername function an usernameNotFoundException to run the create_user function. In this function i create and return a user entity but it is not word. The create_user is running but i can't autenticate me.

Thanks your help.

William.

@ethanhann
Copy link
Contributor

If you don't have a user table to work with you can use the in_memory provider, as demonstrated in the documentation under the Basic Example: HTTP Authentication section. I am not 100% clear on what you are trying to do with the UserFactoryInterface, but if you use the in_memory provider you shouldn't need to create a user programmatically - users should be defined in the config file as shown in the documentation.

If you do want to store users in a table, then I recommend the FOSUserBundle.

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