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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:45:43+00:00 2026-05-18T22:45:43+00:00

One part of our website will be built using Symfony the other Magento .

  • 0

One part of our website will be built using Symfony the other Magento. I would like to know if it is possible to share user session variables between two of them.

Thank you!

  • 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-18T22:45:44+00:00Added an answer on May 18, 2026 at 10:45 pm

    After much trial and error I created the following work around. This is based on a situation where the login is managed by a platform other than Magento.

    I was not able to find a way to share a session with Magento that was initialized outside of Magento. Instead I created a simple Magento extension that hooks to the event observer ‘http_response_send_before’.

    Now whenever Magento loads a page, the module will check to see if the user is logged in to the other system. If so, it retrieves the email of that user, and logs the user into Magento using the email address as the identifier, and sets the session for that customer. Obviously the customer must already exist in Magento for the login to work.

    Here are the files and the code contained within. Feel free to modify to work with your system.

    /app/code/local/Verve/Session/etc/config.xml

    <config>
    <modules>
        <Verve_Session>
            <version>0.5.1</version>
        </Verve_Session>
    </modules>
    <frontend>
        <events> 
            <http_response_send_before>
                <observers>
                    <session_login>
                        <type>model</type> 
                        <class>Verve_Session_Helper_Login</class> 
                        <method>loginEvent</method>
                    </session_login> 
                </observers>
            </http_response_send_before>
        </events> 
    </frontend>
    

    /app/code/local/Verve/Session/Helper/Login.php

     class Verve_Session_Helper_Login extends Mage_Core_Helper_Abstract 
     { 
    
    static function loginEvent($observer) { 
    
        $session = Mage::getSingleton('customer/session');
    
        if (!$session->isLoggedIn()) {
    
    
            YOUR CODE HERE, FIND EMAIL OF LOGGED IN USER
    
    
            if(@$email){
    
                $customer   = Mage::getModel('customer/customer'); 
                $customer->loadByEmail($email); 
                $session    = Mage::getSingleton('customer/session'); 
                $session->start();
                $session->setCustomer($customer);
                $url        = $_SERVER['REQUEST_URI'];
                Mage::app()->getFrontController()->getResponse()->setRedirect($url);
    
            }
    
    
        }   
    
    }
    
     }
    

    /app/etc/modules/Verve_Session.xml

    <config>
    <modules>
        <Verve_Session>
            <active>true</active>
            <codePool>local</codePool>
        </Verve_Session>
    </modules>
    </config>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As part of one our system's we enable a user in the backoffice to
I have some code that at one part will get executed a lot, and
I am bringing in a particular div (.source_div) from one part of my website
Edit: Just for clarification I am using python, and would like to do this
I have an application that I would like to embed inside our companies CMS.
One field in our website's sign-up form is occasionally left blank yet we need
We all know it is nearly impossible to produce a large website without one
For our application, which has a website and a backend, we really like the
We just switched our website over to a new server. There is a part
I'm copying code from one part of our application (an applet) to inside the

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.