cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone

SOLVED

Anyone

Im a newbe to magento and I need to know if there is away to set a lock out for an account after 8 attempts have failed?

When trying to login to an the customers account.

Thanks

Mschmayer

2 REPLIES

Re: Anyone

Hi @mschmayer

 

There is a no default way of adding this feature to your store. However you can easily create it by extending either the login controller or the customer/session or customer/customer model since these are resposable for login in a user.

 

You can create a new attribute on the customer object, that can act as a counter whenever someone tries to log in, and then reset this when a user successfully logs in. 

 

Without actualy testing that this works, adding a new customer attribute should look something like this:

 

$installer = new Mage_Eav_Model_Entity_Setup('core_setup');

$installer->addAttribute('customer', 'login_attempt_counter', array(
    'group'             => 'General',
    'type'              => 'int',
    'label'             => 'Login attempts',
    'input'             => 'text',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible'           => false,
    'required'          => false,
    'user_defined'      => true,
    'default'           => 0
));

I hope this helps :-)

Re: Anyone

thank you i will give this a try.