Magento Forum

   
Disabling Customer Accounts. Is it possible? 
 
lucian303
Member
 
Avatar
Total Posts:  74
Joined:  2008-03-03
 

I’m trying to figure out how to disable a customer account immediately upon created. I have edited the AccountController.php so that after they sign up, they are sent to a page saying their account is in the process of being approved rather than logging them in automatically. However, they can still click login and log in manually.

I’ve tried setting the is_active attribute for the customers in the database to 0 and 2, 3, 4, 5, but no matter what I set it to, it still allows the customers to log in. I can’t see anything else that would do this. Is this possible with the current API? If not, I guess I could modify the login module so that if the status is not 1, they can’t log in.

Any help is greatly appreciated. We’re trying to develop a store that can only be logged into by customers we have pre-approved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lucian303
Member
 
Avatar
Total Posts:  74
Joined:  2008-03-03
 

As a followup, I managed to change the Customer model and Controller so that it no longer logs them in automatically, and when the password is authenticated, it will still return false if ‘is_enabled’ is 0 in the db. I noticed the default value for this is set in the db to 1 so I changed that to 0. No no one can log in till I change it.

Progress. Now my only question is how do I edit that? How would I go about actually creating a query within the system (ie-> not using mysql_ functions directly) so that I can modify that value upon demand. The next step would be to add that to the admin module, though I’d probably wait for the stable release to do that. Any ideas or pointers hugely appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top