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

  • Home
  • SEARCH
  • 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 8545199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:44:21+00:00 2026-06-11T12:44:21+00:00

In my first Symfony2 app the users have to submit three values to login.

  • 0

In my first Symfony2 app the users have to submit three values to login. Username, password and domain. They are on the login form and being submitted according to Firebug but the listener that is supposed to be creating a token is not able to get the values. I had hoped it would be as a simple as this:

class UMListener implements ListenerInterface
{
    protected $securityContext;
    protected $authenticationManager;

    public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager)
    {
        $this->securityContext = $securityContext;
        $this->authenticationManager = $authenticationManager;
    }

    public function handle(GetResponseEvent $event)
    {
        $request = $event->getRequest();
        $token->setUser($request->get('_username'));
        $token->password   = $request->get('_password');
        $token->domain    = $request->get('_domain');
    }

I have checked that the parameters are _username, _password and _domain, and when I print_r the $request I can’t see them anywhere :/

  • 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-06-11T12:44:23+00:00Added an answer on June 11, 2026 at 12:44 pm

    Don’t you just hate it when the very next Google search brings up the answer. Changing

    $token->domain    = $request->get('_domain');
    

    to

    $token->domain    = $request->get('_domain', null, true);
    

    did the trick

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

first take a look on this picture from localScope app : i have 2
I am trying to start use Symfony2, and i have troubles with a first
I am trying to validate an unbound field in my symfony2 form. I have
I have created a nice registration frontend app for registering new users for an
I want to upgrade my app that I've developed with Symfony2 for users who
I'm taking my first steps in Symfony2 entity relations. I have an entity installation,
I'm writing my first Symfony2 app after a few years with Symfony and am
I am building my first Symfony2 project and I may be confused on the
I have a Symfony app that populates the widgets of a portal application and
I'm using Symfony2 and CraueFormFlowBundle to create a multi-step form. Everything is going well

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.