cancel
Showing results for 
Search instead for 
Did you mean: 

Magento Customers cannot login - showing “Invalid login or password.”

Magento Customers cannot login - showing “Invalid login or password.”

Hi guys


I am running Magento CE ver. 1.9.2.2.

 

I have this issue where I create a new customer account, which successfully registers and logs in automatically after registration. However, after I logout and try to log back in, I get the standard incorrect login or password validation error.

 

The odd thing is that old accounts have no issues logging in, so I wonder if there is an error in terms of storing passwords. However, I have checked the database table and the hashed passwords are being stored properly. It almost seems like a vaulty validation function.

 

Any ideas?

 

Cheers

M

 

4 REPLIES 4

Re: Magento Customers cannot login - showing “Invalid login or password.”

Hi @Marked13,

 

Are you using a custom theme? (maybe some issue with the form key)

All those clients were created at frontend? Can you check if customer group value is correct for those customer?

Re: Magento Customers cannot login - showing “Invalid login or password.”

I am indeed using a custom theme, but it is up to date in respect of when they bought in the form keys. 

 

Those clients were created from the front-end, but same result for customers created in the back-end. Seems like any newly created clients' passwords aren't validating correctly. 

 

The custom group value is correctly set. Even if I manually change it to something else - same result. 

Re: Magento Customers cannot login - showing “Invalid login or password.”

@Marked13 Can you show your login form code? Based on seeing code, we can help for you.

 

Thanks.

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Magento Customers cannot login - showing “Invalid login or password.”

Sure, however, given that older accounts are logging in just fine, I don't think it's the form that is the issue. 

 

<div class="account-login">
    <div class="page-title">
        <h1><?php echo $this->__('Login or Create an Account') ?></h1>
    </div>

    <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
    <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
        <?php echo $this->getBlockHtml('formkey'); ?>

        <div class="row">
            <div class="col-sm-6 new-users">
                <div class="content">
                    <h2><?php echo $this->__('New Customers') ?></h2>
                    <p><?php echo $this->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
                </div>
                <div class="buttons-set">
                    <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo Mage::helper('persistent')->getCreateAccountUrl($this->getCreateAccountUrl()) ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
                </div>
            </div>
            <div class="col-sm-6 registered-users">
                <div class="content">
                    <h2><?php echo $this->__('Registered Customers') ?></h2>
                    <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
                    <ul class="form-list">
                        <li>
                            <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
                            <div class="input-box">
                                <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
                            </div>
                        </li>
                        <li>
                            <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
                            <div class="input-box">
                                <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
                            </div>
                        </li>
                        <?php echo $this->getChildHtml('form.additional.info'); ?>
                        <?php echo $this->getChildHtml('persistent.remember.me'); ?>
                    </ul>
                    <?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
                    <p class="required"><?php echo $this->__('* Required Fields') ?></p>
                </div>
                <div class="buttons-set">
                    <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
                    <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
                </div>
            </div>
        </div>
        <?php if (Mage::helper('checkout')->isContextCheckout()): ?>
            <input name="context" type="hidden" value="checkout" />
        <?php endif; ?>
    </form>
    <script type="text/javascript">
    //<![CDATA[
        var dataForm = new VarienForm('login-form', true);
    //]]>
    </script>
</div>