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 7624681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:01:35+00:00 2026-05-31T05:01:35+00:00

I am working on a relatively simple login system for Symfony2. I have the

  • 0

I am working on a relatively simple login system for Symfony2.

I have the basics down and working just fine.

What makes this a bit special is I need a way to provide a third value (an ecosystem value). The user names in my database are not unique on their own, but make unique pairs with an ecosystem value.

The ecosystem value is provided by the form that they log in from.

How can I use this ecosystem value be taken into consideration when performing a login?

  • 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-31T05:01:37+00:00Added an answer on May 31, 2026 at 5:01 am

    Take a look at the Cookbook tutorial on How to load Security Users from the Database (the Entity Provider) – specifically the part about Authenticating Someone with a Custom Entity Provider.

    This part explains how to alter/create a UserProviderInterface to allow logging in via an e-mail address or username. Obviously, this isn’t what you want, but – it should be relatively trivial to modify the code to also query/validate against your 3rd login parameter.

    Ideally, you will probabaly want to create your own UserProvider and luckily, there is a cookbook tutorial just for that: How to create a custom User Provider.


    Update: To have the 3rd login option handled and passed to your custom providers (created above), you will also need to create a custom Authentication Provider. Take a look at (yet another) cookbook article on How to create a custom Authentication Provider. This article is tailored for handling extra request header parameters for authentication, but using this example you should be able to swap out request headers for request POST values.

    Use the cookbook article to get an understanding of how authentication with Symfony2 works, but use (and extend) the username/password functionality of Symfony2 and just include your 3rd parameter. Some classes to look at:

    • UsernamePasswordFormAuthenticationListener
    • UsernamePasswordToken
    • UserAuthenticationProvider
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a relatively simple website with (currently) a single resource. I have
I have a relatively simple site that I'm working up for an intranet environment.
I can't get my head around why this isn't working.. I have a relatively
I'm working on a relatively simple Android app. I want it to have an
I'm working on this relatively simple site: http://harrisonfjord.com/folio/test.html The images being displayed are 800x600;
I have been working on a (relatively) simple tcp client/server chat program for my
I'm building a relatively simple programme to test collision detection, it's all working fine
The Project I'm working on a relatively simple iPhone OS project that's navigation controller
I'm working on a relatively simple 2D side-scrolling iPhone game. The controls are tilt-based.
The app I'm working on is relatively simple but it is throwing memory warnings.

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.