Magento Module: Login Director

A multi-store login detection system which would prompt visitors with cross-website accounts to select their destination store view.


This module was developed to allow visitors to sign into any store view and, upon detection of matching account by e-mail address across multiple websites in the application, be prompted to select the desired store view.

The purpose for this module was to reduce account access friction and confusion, since the application served a B2C and B2B audience with cross-over between customers.

The module had to be developed for compatibility with an existing store login control extension.


Step 1: Sign-in from top navigation pop-out

Step 2: Receive prompt to select destination store

Technical Features

Code Sample

public function processCustomerLogin(Varien_Event_Observer $observer)
    try {
        if (!$this->_isEnabled()) {

        if ($this->_getSession()->getDisableLoginDirectorFlag()) {


        $customer   = $observer->getEvent()->getCustomer();
        $data       = Mage::getModel('itoris_stlc/customer')->loadCustomer($customer, true);

        $this->_filterStoreAccessData($data, $customer);

        if (count($data) > 1) {

            if ($this->_isInlineMode()) {

            } else {
        } else if ($this->_isInlineMode()) {
            $this->_sendInlineResponse(Mage::helper('customer')->getDashboardUrl(), true);
    } catch (Exception $error) {

Static Analysis