Autologin in Prestashop

 

Today we are glad to introduce to our community a new free module: «Belvg_AutoLogin». In future this module will help us demonstrate how our modules work. The idea of this module is that it allows users to test modules, which are installed on our demo-shops, without creating accounts.   Using the form, shown below, users can log into the demo-shop under a profile of some other user, who have already been registered in the system.

1Autologin in Prestashop

To make the user appear in the form, he should be recorded in the table belvg_autologin  and should also exist in the standard table ps_customer. The user can be added to thebelvg_autologin table both manually and automatically.  The automatic mode is controlled by the property belvg_autologin::$default_customers:

It contains an array of users’ IDs, whose profiles we want to use to allow free logging into the system.

The authorization is controlled by the controller Belvg_AutoLoginDefaultModuleFrontController and its method prосessLоgin( ):

 

Leave a comment