0

The Symfony2 Security documentation is pretty complex and not well documented.

I have a question regarding how to Authenticate a user from database. There is no good example as to how to Authenticate using simple username and password from database table.

My question is, in order to Authenticate should I 1) Implement the UserProviderInterface interface and call function loadUserByUsername 2) If user found return the User Object 3) Check if form submitted password and the User object password match

Is this correct?

Please advise

1 Answer 1

4

While I agree it is a little complex, everything you need is documented and not too hard to find with a little research, hopefully the following helps you out:

Check out the FOSUserBundle if you want to store users via Doctrine ORM, MongoDB/CouchDB ODM or Propel.

If you want to entirely build your own user provider follow this guide.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.