Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6145419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:47:31+00:00 2026-05-23T18:47:31+00:00

After struggling all day with a simple taks for Symfony 2 with no luck,

  • 0

After struggling all day with a simple taks for Symfony 2 with no luck, I decided to ask you guys for a solution.

Here is the problem: I would like to make a http_basic authentication using doctrine, so users would be prompted to enter username/password which are kept in a database.

So, I followed these steps:

1) Created a new entity called User with the interactive console generator.

This is how it looks like:

http://pastebin.com/3RzrwFzL

2) As stated in the documentation I have implemented UserInterface and added the 4 missing methods. Now the entity looks like this:

http://pastebin.com/Epw3YrwR

3) I have modified the security.yml as little as possible to make it work, and it looks like this:

http://pastebin.com/tp6Gd7t7

I cleared the cache and tried to access app_dev.php/admin and of course I get the same error all day:

There is no user provider for user “Symfony\Component\Security\Core\User\User”.

500 Internal Server Error – RuntimeException

Can anyone tell me where is the problem?
I have tried this thousand different ways and weirdly it worked for a moment, but when I tried to add sha1 as encoder algorithm instead of plaintext, and cleared the cache, I came back to the same error.. since then I get nothing else but it. It is like if there is a hidden cache that is being erased whenever symfony decides 😀

I think the error might also be in the 4 methods of the entity, but I cannot fix them since there is no documentation about what should they do.

I am currently using RC4.

Thanks in advance, hope someone will help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:47:31+00:00Added an answer on May 23, 2026 at 6:47 pm

    Had the same problem. It seems that this works. I will only use it in the development process later on i will find a solution.!

    security:
        role_hierarchy:
            ROLE_ADMIN:       ROLE_USER
            ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
    
    
        providers:
            chain_provider:
                providers: [in_memory, user_db]
            in_memory:
                users:
                    cheese: { password: olo, roles: ROLE_ADMIN }
            user_db:
                entity: { class: Abc\BaseBundle\Entity\User, property: username }
    
    
        encoders:
            Symfony\Component\Security\Core\User\User: plaintext
            Abc\BaseBundle\Entity\User: plaintext
    
        firewalls:
            dev:
                pattern:  ^/(_(profiler|wdt)|css|images|js)/
                security: false
    
            panel:
                pattern:    ^/(panel|login_check)
                anonymous: ~
                form_login:
                    login_path:  /login
                    check_path:  /login_check
                    default_target_path: /panel/
                logout:
                    path:   /logout
                    target: /
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been struggling all morning to try and work out how mod_rewrite works after
Ive been struggling with this all day, been close a couple times but nothing
Hi all im struggling a little here with using COLLATE to ignore accents whilst
Hey all, I am using beautifulsoup (after unsuccessfully struggling for two days with scrapy)
I am struggling to find a solution to a problem where a user visits
After struggling all weekend, I finally have a sphere reflecting its environment in OpenGL.
OK so after struggling for a while trying to get cURL to fetch a
After some struggling I managed to get boost smart pointers to build for Windows
After a week of struggling I just got the msdeploy handler up on IIS7
I'm trying (or rather struggling) to create a little Blackjack game. After some JavaScript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.