User Registeratoin with verification
Posted: Thu Oct 16, 2008 10:55 am
There may be situations when you want to be sure that the user name(Email Address) provided by the customer during the registration is valid. I have seen some posts around the forums and when answering some of these post for a solution I found that this could be easily done in AbleCommerce. The adopted solution is as below.
Solution:
When a new user comes to the store and try to register, instead of making him login after registration just make the user disable, generate a verification code and put it in the user settings. Then using the user's UserId and Verification code create a URL and send this URL in an Email to the customer's Email address and ask him to follow the URL sent to him. If the customer follows the link and reaches to your desired page, get the UserId and verification code from the URL. Now using that user id load the user and match the verification code you get from the URL with the verification code in that user's settings. If both are same just approve the user and ask him to login.
This technique will made it possible that all users have the proper Email address and you can contact them. You can also write your clean up service which may remove those users who did not verified their accounts within a specified amount of time.
I thought it would be better to implement the basic stuff my self and so i did. You can download the attachment and install it in the same order as its directory structure. Almost all basic functionality is done. Most probably you will need to change the Email alert contents or the messages which are being shown at registration or on the verification completion page.
Email Settings
When sending the Email AbleCommerce code is used. So if you have configured the Email settings properly it will work. The Email alerts make use of default from address so please don't forget to specify the Default From address in Email settings.
Solution:
When a new user comes to the store and try to register, instead of making him login after registration just make the user disable, generate a verification code and put it in the user settings. Then using the user's UserId and Verification code create a URL and send this URL in an Email to the customer's Email address and ask him to follow the URL sent to him. If the customer follows the link and reaches to your desired page, get the UserId and verification code from the URL. Now using that user id load the user and match the verification code you get from the URL with the verification code in that user's settings. If both are same just approve the user and ask him to login.
This technique will made it possible that all users have the proper Email address and you can contact them. You can also write your clean up service which may remove those users who did not verified their accounts within a specified amount of time.
I thought it would be better to implement the basic stuff my self and so i did. You can download the attachment and install it in the same order as its directory structure. Almost all basic functionality is done. Most probably you will need to change the Email alert contents or the messages which are being shown at registration or on the verification completion page.
Email Settings
When sending the Email AbleCommerce code is used. So if you have configured the Email settings properly it will work. The Email alerts make use of default from address so please don't forget to specify the Default From address in Email settings.