Jump to content

Customer registration message


smarthomesys

Recommended Posts

Hello everyone

In a normal mode of registration the user immediately after registering is active and directly logs in the online store. I prefer the user not to be active until their address and contact data is not approved by the administrator on the phone and in that case I removed in AuthController.php not to be active after registration ($customer->active = 0). In that way immediately after the user's registration it redirects them to "index.php?controller=authentication&back=my-accoun" and does not log them in the system, which is normal since they are not active.

The issue is that I want to provide a message exactly at that time which will notify the user that an approval of his data is waiting, not certain how to make that happen.

Could you please guide me how to proceed.

 

Thank you!

Link to comment
Share on other sites

  • 2 months later...

Hi when you still search for the solution

Its not soo dificult in the end

 

In the controllers/front/AuthController.php

 

you add In the * Process login *

 

in the line 280

 

you can add this

 


if(!$customer->active)
           {            
           $this->errors[] = Tools::displayError('Your account is waiting for shop approval.');                
           }        
           elseif (!$authentication || !$customer->id)
           {        
               // Handle brute force attacks
               sleep(1);
               $this->errors[] = Tools::displayError('Authentication failed');
           }
           else
...

 

you can change the message of corse

 

hope it can help you

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...