0

I have created a custom login form for an app created in Magento some time ago. Everything worked fine until now. Some of the customers are redirected back to the login form after the login process - on their browsers (if I try to login with their credentials, it's working fine).

So, my guess was sessions and I logged them. Session got it in the correct way.

Login is simple, based on Magento login form:

if ($this->_getSession()->isLoggedIn()) {
        $this->_redirect('*/*/');
        return;
    }

    $login = $this->getRequest()->getPost('login');
    $session = $this->_getSession();
    /* do some password stuff */
    // here here
    $session->login($login['username'], $client_password);
    $this->_loginPostRedirect();

I tested their login and logged the session: Mage_Customer_Model_Session Object - everything OK, looks the same as any other customer sessions.

The last url var for this kind of users is /customer/account/loginPost/.

Only with this settings will work for me. If I will change them it will crash.

Cookie Path : /
Cookie Domain: *blank*

I repeat: For some customers everything works OK. Also, for the users with problems, I can login myself into the app. What could happen? I saved the sessions in files and then I saved them in db - same results.

1

Had totally same issue. The reason was caching. Put page were you have custom login form to ignore list so it will not be cached

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.