I've been trying to get a database login system working with Symfony2. I've read through the docs but I'm totally stumped now as to what to do...
Every time I try to log in I just get 'Bad Credentials'.
The 'User' class implementing UserInterface is here:
The 'UserRepository' class is here:
The 'security.yml' file is here:
The database scheme is like this:
I just have no idea where to go from here... :L I've been looking around and I'm just not getting some of the other things in tutorials, maybe it's just the time of day! It's been a long week...
Any help would be greatly appreciated.
At a glance, you have a small typo in your loadUserByUsername
method:
->where('u.account_name = :usefdgdfgfrname OR u.account_email = :email')
Should be:
->where('u.account_name = :username OR u.account_email = :email')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.