MahmutGulerce Posted May 25, 2015 Posted May 25, 2015 (edited) This module allows BO administrators to login FO as a customer by clicking a simple button at AdminCustomer page. Adds a simple login button to customer pages at BO. The module never needs to change password of customer or any information of a customer. It is also quick and safe due to using own encryiption keys. Can be used for: Create orders on behalf of your customers (customers who requested help to ordering just like in live chat, or by phone) Redirecting customer by browsing same pagea step by step Check for errors or feedbacks froms customer quickly Update: Please follow https://github.com/rowanfuchs/PrestaShop-login-as-a-customer download up to date files. Thanks to @Rowan - 999 Games PrestaShop-login-as-a-customer-master.zip Edited August 30, 2019 by MahmutGulerce (see edit history) 9 3 Share this post Link to post Share on other sites More sharing options...
Inform-All Posted March 16, 2016 Posted March 16, 2016 You sir, did a great job! Works perfect, thank you so much! 1 Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted March 16, 2016 Posted March 16, 2016 You sir, did a great job! Works perfect, thank you so much! Thanks for your feed back. I feel in outer space due to no one interested in this module yet. Have a nice shop ! Share this post Link to post Share on other sites More sharing options...
sseleraci Posted March 17, 2016 Posted March 17, 2016 v.1.6.1.4 Thank you. 1 Share this post Link to post Share on other sites More sharing options...
hollandtextiles Posted March 23, 2016 Posted March 23, 2016 Thanks for the module! In the multistore it's working but when a customer belongs to another multistore you can login in every multistore without warning. When you can fix this it;'s perfect! Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted April 12, 2016 Posted April 12, 2016 Thanks for the module! In the multistore it's working but when a customer belongs to another multistore you can login in every multistore without warning. When you can fix this it;'s perfect! Thanks hollandtextiles In fact,I think it looks like it should be. Prestashop core allows that. But if you explain more what restrictions you need I will work on it. Share this post Link to post Share on other sites More sharing options...
Rhobur Posted April 13, 2016 Posted April 13, 2016 Thank you for this very useful module! I was looking for a solution like this and almost resigned to the idea that I'll have to make a module myself. Thanks for helping me and others with that. 1 Share this post Link to post Share on other sites More sharing options...
Rhobur Posted May 17, 2016 Posted May 17, 2016 Hi Mahmut, Can it be made to work with other profiles not only with the administrator one? Regards, Robert [EDIT] : Never mind, solved it by moving it to another hook. Share this post Link to post Share on other sites More sharing options...
DBMAN Posted July 14, 2016 Posted July 14, 2016 1.6.1.1 Got this installed but when I try to login as customer I get a little generic icon with a lock on it. Any clues? Share this post Link to post Share on other sites More sharing options...
Inform-All Posted July 14, 2016 Posted July 14, 2016 1.6.1.1 Got this installed but when I try to login as customer I get a little generic icon with a lock on it. Any clues? What rights does the employee account have when you try this? Share this post Link to post Share on other sites More sharing options...
DBMAN Posted July 14, 2016 Posted July 14, 2016 Thanks, SuperAdmin Share this post Link to post Share on other sites More sharing options...
ritopina Posted July 15, 2016 Posted July 15, 2016 Very nice thanks Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted July 25, 2016 Posted July 25, 2016 Hi Mahmut, Can it be made to work with other profiles not only with the administrator one? Regards, Robert [EDIT] : Never mind, solved it by moving it to another hook. I should add a function for permissions. Thanks for this nice idea ! Share this post Link to post Share on other sites More sharing options...
centoasa Posted December 21, 2016 Posted December 21, 2016 Great! works great! Thank you so much! Share this post Link to post Share on other sites More sharing options...
Alvaro Tarela Posted January 9, 2017 Posted January 9, 2017 When you login as the customer, the cart is empty.Why? I'd like to see the real status of the customer to add items to his cart and that he can see them when he connects. Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted January 9, 2017 Posted January 9, 2017 When you login as the customer, the cart is empty. Why? I'd like to see the real status of the customer to add items to his cart and that he can see them when he connects. It doesn't touch cart or any other data of customer when you login as a customer. May you tried on a customer with an empty cart ? Share this post Link to post Share on other sites More sharing options...
zplus2 Posted February 14, 2017 Posted February 14, 2017 1.6.1.4 - everything looks OK, good job, thank you Share this post Link to post Share on other sites More sharing options...
Nandos Posted April 21, 2017 Posted April 21, 2017 Is this available for PS v1.7? If not, are you planning to do it for the new release? Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted April 22, 2017 Posted April 22, 2017 Is this available for PS v1.7? If not, are you planning to do it for the new release? I will. But in fact, I think, developing a new module (not an upgrade) to 1.7 can be easier. Because current module has just a few lines of a few files. But the upgrade have to be tons of lines due to the 1.7 structure Share this post Link to post Share on other sites More sharing options...
kamppa Posted July 7, 2017 Posted July 7, 2017 Installed to 1.6.1.10 and when I click the button to login as customer it gets redirected to the login as customer icon. There's nothing else in the page. 1 Share this post Link to post Share on other sites More sharing options...
Inform-All Posted July 7, 2017 Posted July 7, 2017 Installed to 1.6.1.10 and when I click the button to login as customer it gets redirected to the login as customer icon. There's nothing else in the page. What are your cookie settings? And have you cleared them after the install? Share this post Link to post Share on other sites More sharing options...
kamppa Posted July 10, 2017 Posted July 10, 2017 I tried again. Deleted all cookies from Firefox after install and tried again but the same result. I don't know about my cookie settings. Should be standard I guess. Share this post Link to post Share on other sites More sharing options...
kellyriverstone Posted September 15, 2017 Posted September 15, 2017 (edited) Prestashop 1.7.2.2 through Chrome Browser Works!!! Many thanks! Edited September 15, 2017 by kellyriverstone (see edit history) Share this post Link to post Share on other sites More sharing options...
tivicrdotcom Posted September 28, 2017 Posted September 28, 2017 Hi, seems useful, when I installed though, I get the following message (because I have another module using the primary key)Duplicate entry '2-124' for key 'PRIMARY'INSERT INTO `ps_module_access` (`id_profile`, `id_module`, `view`, `configure`, `uninstall`) ( SELECT id_profile, 124, 1, 1, 1 FROM ps_access a WHERE id_tab = ( SELECT `id_tab` FROM ps_tab WHERE class_name = 'AdminModules' LIMIT 1) AND a.`view` = 1) Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted September 28, 2017 Posted September 28, 2017 Hi, seems useful, when I installed though, I get the following message (because I have another module using the primary key) Duplicate entry '2-124' for key 'PRIMARY' INSERT INTO `ps_module_access` (`id_profile`, `id_module`, `view`, `configure`, `uninstall`) ( SELECT id_profile, 124, 1, 1, 1 FROM ps_access a WHERE id_tab = ( SELECT `id_tab` FROM ps_tab WHERE class_name = 'AdminModules' LIMIT 1) AND a.`view` = 1) More like something went wrong about permissions/tabs before installation. I guest you can still use it. Share this post Link to post Share on other sites More sharing options...
tivicrdotcom Posted September 29, 2017 Posted September 29, 2017 (edited) More like something went wrong about permissions/tabs before installation. I guest you can still use it. I re-installed it and got no error this time so it was something random. Now, I don't see the log in button, it displays "" at the bottom of the customer's info page and if I click on it it takes me to the developer's website. Edited October 1, 2017 by tivicrdotcom (see edit history) Share this post Link to post Share on other sites More sharing options...
tivicrdotcom Posted September 30, 2017 Posted September 30, 2017 Has anybody experienced this issue? Not being able to see/view the log i n as a customer button? Share this post Link to post Share on other sites More sharing options...
b-w-p Posted November 13, 2017 Posted November 13, 2017 bonjour, félicitations pour votre module fonctionne très bien avec 1.6.1.17 merci Share this post Link to post Share on other sites More sharing options...
wiros Posted January 31, 2018 Posted January 31, 2018 Hi, I tried using the module in PS 1.7.2.2, But did not work. When I try to loging as customer, I get the login window. Is there a solution? Thanks, Robert Share this post Link to post Share on other sites More sharing options...
HavanA Posted February 18, 2018 Posted February 18, 2018 Thank you for this module! Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted February 20, 2018 Posted February 20, 2018 On 18.02.2018 at 8:49 AM, HavanA said: Thank you for this module! Thanks for your feedback. Is there anyone to request a feature for next version ? I'm going to publish new version next week. Share this post Link to post Share on other sites More sharing options...
lubo_ke Posted March 8, 2018 Posted March 8, 2018 MahmutGulerce Thanks for Great module :-) For those who has problem with login as customers, and after click on icon login as customer saw new page with login screen - its because the customer, you're trying to login, has account in guest group. after transforming it to regular customer account it will work like a charm. Share this post Link to post Share on other sites More sharing options...
Reho Posted March 26, 2018 Posted March 26, 2018 Hey Dear Developer, Theres is a big security hole in this plugin. I don't want to explain to everbody but i can log in every store-s, every customer's account where this plugin has been installed. I don't need any secret key or anything, just trying throught the possible customer ids. I think you should fix it! Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted March 26, 2018 Posted March 26, 2018 2 hours ago, Reho said: Hey Dear Developer, Theres is a big security hole in this plugin. I don't want to explain to everbody but i can log in every store-s, every customer's account where this plugin has been installed. I don't need any secret key or anything, just trying throught the possible customer ids. I think you should fix it! Hi Reho thank you for your feedback. As the nature of opensource, secret information can not help to keeping safety, So you might as well share you found here, than let us fix if there is a issue. Thanks Share this post Link to post Share on other sites More sharing options...
Reho Posted March 26, 2018 Posted March 26, 2018 2 minutes ago, MahmutGulerce said: Hi Reho thank you for your feedback. As the nature of opensource, secret information can not help to keeping safety, So you might as well share you found here, than let us fix if there is a issue. Thanks Okay, here it is: You can log in with a user for example ID 4 by accessing the following URL: /module/loginascustomer/login?id_customer=4&itoken=a87ff679a2f3e71d9181a67b7542122c a87ff679a2f3e71d9181a67b7542122c is the md5 hash of "4", what you can generate in any online services, you don't need to write any code. I don't know why you need the itoken in the /controllers/front/login.php:41 it's just looks like a backdoor. With these method, any data miner or hacker can walk through the shop's customers and collect sensiteve data. Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted March 26, 2018 Posted March 26, 2018 Hi Thanks for reply, It seems the the file I attached first message is not the last version. The condition is if ($id_customer = (int)Tools::getValue('id_customer') && Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) And the makeToken function uses a protected-hidden defined key (_COOKIE_KEY_) of store like: public function makeToken($id_customer) { return md5(_COOKIE_KEY_.$id_customer.date("Ymd")); } for the version I've. Anyway, thank you for your feedback. In fact, I've not updated this topic more than 2 years. I'm updating the file in first message right now. thanks. Share this post Link to post Share on other sites More sharing options...
Reho Posted March 26, 2018 Posted March 26, 2018 8 minutes ago, MahmutGulerce said: Hi Thanks for reply, It seems the the file I attached first message is not the last version. The condition is if ($id_customer = (int)Tools::getValue('id_customer') && Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) And the makeToken function uses a protected-hidden defined key (_COOKIE_KEY_) of store like: public function makeToken($id_customer) { return md5(_COOKIE_KEY_.$id_customer.date("Ymd")); } for the version I've. Anyway, thank you for your feedback. In fact, I've not updated this topic more than 2 years. I'm updating the file in first message right now. thanks. Yepp, that fix seems ok. Hope all of the installed sites will update this plugin. Share this post Link to post Share on other sites More sharing options...
gray Posted March 26, 2018 Posted March 26, 2018 I cannot installed the zip file. As it comes back with error message " This file does not seem to be a valid module zip " I am using PS1.7.3 Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted March 31, 2018 Posted March 31, 2018 On 3/26/2018 at 11:25 PM, gray said: I cannot installed the zip file. As it comes back with error message " This file does not seem to be a valid module zip " I am using PS1.7.3 Fıxed ! Share this post Link to post Share on other sites More sharing options...
ritopina Posted April 2, 2018 Posted April 2, 2018 Hi, Prestasop 1.7.3 work Thank Share this post Link to post Share on other sites More sharing options...
gray Posted April 2, 2018 Posted April 2, 2018 Works gr8 on PS1.7.3 - One of the best needed modules. Thxs. Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted April 2, 2018 Posted April 2, 2018 2 hours ago, ritopina said: Hi, Prestasop 1.7.3 work Thank 2 hours ago, gray said: Works gr8 on PS1.7.3 - One of the best needed modules. Thxs. That's the way to get happy for me. Thanks for feedbacks. Share this post Link to post Share on other sites More sharing options...
Daniela Posted May 17, 2018 Posted May 17, 2018 On 3/26/2018 at 4:30 PM, Reho said: Yepp, that fix seems ok. Hope all of the installed sites will update this plugin. I installed on my prestashop 1.6.1.11 and it work But please let me know if the security issue is rezolved. Thanks for the amazing module! Share this post Link to post Share on other sites More sharing options...
Josip Posted June 13, 2018 Posted June 13, 2018 (edited) PS 1.7.2.4 am i looking something wrong, but i cant see the "button". Installation went ok. Do i need to modify something because of PS v 1.7 or? Tx Sorry i was looking at wrong place, it works great. Thank you. Edited June 13, 2018 by Josip SOLVED (see edit history) Share this post Link to post Share on other sites More sharing options...
MacRoy Posted June 13, 2018 Posted June 13, 2018 Hi MahmutGulerce. Thanks a lot for the module! Best regards MacRoy Share this post Link to post Share on other sites More sharing options...
Snorreh Posted June 18, 2018 Posted June 18, 2018 Just what i was looking for! Thank you MahmutGulerce. Share this post Link to post Share on other sites More sharing options...
Sanchofred Posted July 12, 2018 Posted July 12, 2018 (edited) Hi, thank lot for your module. I'm using prestashop 1.6.1.19 I'm having a problem with the module that is causing a 500 error. It worked on a few clients and then caused this error. I use a module that allows to connect with Amazon, paypal, twitter etc ... the problem can not it come from there when a customer has created his account in this way? Best regards Edited July 12, 2018 by Sanchofred (see edit history) Share this post Link to post Share on other sites More sharing options...
swz3000 Posted August 19, 2018 Posted August 19, 2018 Great module, thanks for share. Share this post Link to post Share on other sites More sharing options...
Un_Tal_Iban Posted August 20, 2018 Posted August 20, 2018 (edited) On 14/8/2018 at 12:49 AM, Pablus said: Can you tell me where is the button? I couldn´t fin it editing an order o searching in customer logs, regards Inside the customer profile in BO Thanks for the work! Edited August 20, 2018 by tali656 (see edit history) Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted August 24, 2018 Posted August 24, 2018 On 8/19/2018 at 4:27 PM, swz3000 said: Great module, thanks for share. I'm glad to you liked. Share this post Link to post Share on other sites More sharing options...
Cuball Posted October 8, 2018 Posted October 8, 2018 On 3/27/2018 at 12:17 AM, MahmutGulerce said: Hi Thanks for reply, It seems the the file I attached first message is not the last version. The condition is if ($id_customer = (int)Tools::getValue('id_customer') && Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) And the makeToken function uses a protected-hidden defined key (_COOKIE_KEY_) of store like: public function makeToken($id_customer) { return md5(_COOKIE_KEY_.$id_customer.date("Ymd")); } for the version I've. Anyway, thank you for your feedback. In fact, I've not updated this topic more than 2 years. I'm updating the file in first message right now. thanks. Hi, is the attachment on the first post the updated one? i've installed it, but i can still access other accounts by using the MD5 spoofing issue as pointed out by Reho. Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted October 9, 2018 Posted October 9, 2018 9 hours ago, Cuball said: Hi, is the attachment on the first post the updated one? i've installed it, but i can still access other accounts by using the MD5 spoofing issue as pointed out by Reho. Yes ! It's up to date. Share this post Link to post Share on other sites More sharing options...
Cuball Posted October 9, 2018 Posted October 9, 2018 1 hour ago, MahmutGulerce said: Yes ! It's up to date. Strange, I can still access other profiles from the front end by using the MD5 spoofing "/module/loginascustomer/login?id_customer=4&itoken=a87ff679a2f3e71d9181a67b7542122c " Was this fixed already? because it is a security issue. Share this post Link to post Share on other sites More sharing options...
zapalm Posted October 16, 2018 Posted October 16, 2018 On 09.10.2018 at 7:55 PM, Cuball said: Was this fixed already? because it is a security issue. It's not fixed yet. To fix this you can change the code of loginascustomer\controllers\front\login.php file, i.e. remove a code from the condition: OR Tools::getValue('itoken') == md5((string)Tools::getValue('id_customer')) Share this post Link to post Share on other sites More sharing options...
MahmutGulerce Posted October 16, 2018 Posted October 16, 2018 @zapalm thank's its fixed now. @Cuball yep! Share this post Link to post Share on other sites More sharing options...
MakeOn Posted November 8, 2018 Posted November 8, 2018 Report: Error 500 when following button "Login As Customer" in Prestashop 1.7.4.3 PHP server error: AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected '{' in [...]/modules/loginascustomer/controllers/front/login.php on line 42\n' But I didn't find anything wrong there =/ Share this post Link to post Share on other sites More sharing options...
Sasni Posted November 16, 2018 Posted November 16, 2018 @MakeOn, @MahmutGulerce Line 41 is: if ($id_customer = (int)Tools::getValue('id_customer') && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) should be: if ($id_customer = (int)Tools::getValue('id_customer') && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer))) And i have problem when i click "login as customer" button: login attempt failed Please retry by using your admin panel. How to fix? 1 Share this post Link to post Share on other sites More sharing options...
MakeOn Posted November 18, 2018 Posted November 18, 2018 (edited) Thanks @Sasni I didn't realize about that close ) Now when following button "Login As Customer" the debug said me "Undefined variable: id_customer" Screenshot: Maybe now the variable have another name in new versions? (I'm using Prestashop 1.7.4.3) Edited November 18, 2018 by MakeOn adding last line (see edit history) Share this post Link to post Share on other sites More sharing options...
Interesto Posted November 21, 2018 Posted November 21, 2018 Unfortunately 500 error on 1.7.4 unexpected '{' in /modules/loginascustomer/controllers/front/login.php on line 42 Should be something small Share this post Link to post Share on other sites More sharing options...
Sasni Posted November 21, 2018 Posted November 21, 2018 (edited) @Interesto look here -> @MakeOn edit line 41 in login.php if ($id_customer = (int)Tools::getValue('id_customer')) and it works SUMMARY: To remove errors, you need to edit line 41 if ($id_customer = (int)Tools::getValue('id_customer') && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) should be: if ($id_customer = (int)Tools::getValue('id_customer')) Edited November 21, 2018 by Sasni (see edit history) 1 Share this post Link to post Share on other sites More sharing options...
Interesto Posted November 22, 2018 Posted November 22, 2018 Dont get it working in 1.7.3 Parse error: syntax error, unexpected '{' in /home/admin/web/domain.com/public_html/modules/loginascustomer/controllers/front/login.php on line 44 if a get rid of the 44 I get this error... Parse error: syntax error, unexpected '$customer' (T_VARIABLE) in /home/admin/web/domain.com/public_html/modules/loginascustomer/controllers/front/login.php on line 45 -------------------- class LoginAsCustomerLoginModuleFrontController extends ModuleFrontControllerCore { public $ssl = true; public $display_column_left = false; /** * @see FrontController::initContent() */ public function initContent() { parent::initContent(); // if ($id_customer = (int)Tools::getValue('id_customer') && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) if ($id_customer = (int)Tools::getValue('id_customer')) { $customer = new Customer((int)$id_customer); if (Validate::isLoadedObject($customer)) { $customer->logged = 1; $this->context->customer = $customer; $this->context->cookie->id_customer = (int)$customer->id; $this->context->cookie->customer_lastname = $customer->lastname; $this->context->cookie->customer_firstname = $customer->firstname; $this->context->cookie->logged = 1; $this->context->cookie->check_cgv = 1; $this->context->cookie->is_guest = $customer->isGuest(); $this->context->cookie->passwd = $customer->passwd; $this->context->cookie->email = $customer->email; Tools::redirect('index.php?controller=my-account'); } } $this->setTemplate('failed.tpl'); } } Share this post Link to post Share on other sites More sharing options...
Sasni Posted November 26, 2018 Posted November 26, 2018 show me your login.php file Share this post Link to post Share on other sites More sharing options...
moderator6000 Posted November 26, 2018 Posted November 26, 2018 (edited) On 11/16/2018 at 11:09 PM, Sasni said: And i have problem when i click "login as customer" button: login attempt failed Please retry by using your admin panel. How to fix? I just downloaded the module and I've the same problem Running PS 1.6.1.11To solve that, follow this one: https://blog.floriancourgey.com/2018/09/module-login-as-customer-in-prestashop-1-6-1-7/ Edited November 26, 2018 by moderator6000 Solution (see edit history) Share this post Link to post Share on other sites More sharing options...
lukash4 Posted December 27, 2018 Posted December 27, 2018 not working in 1.6.18 Share this post Link to post Share on other sites More sharing options...
venalsol Posted January 21, 2019 Posted January 21, 2019 On 11/21/2018 at 10:30 PM, Sasni said: @MakeOn edit line 41 in login.php if ($id_customer = (int)Tools::getValue('id_customer')) and it works SUMMARY: To remove errors, you need to edit line 41 if ($id_customer = (int)Tools::getValue('id_customer') && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) should be: if ($id_customer = (int)Tools::getValue('id_customer')) This worked for me. And i had many errors as well, as most of you. Just changing this made it work for 3 Different versions i have currently running: Prestashop 1.7.3.3 Prestashop 1.7.4 Prestashop 1.7.1.X (For some reason, i can't access the Info Page of this particular Prestashop since installation almost) Thanks to the Developer by the way, this is really usefull for us. Share this post Link to post Share on other sites More sharing options...
ANGELO Vintage Posted January 31, 2019 Posted January 31, 2019 (edited) PS 1.6.1.18 the latest version you posted in first post give me error 500. Doing a diff of old and latest version the difference is in the login.php file: OLD version: if (($id_customer = (int)Tools::getValue('id_customer')) && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer) OR Tools::getValue('itoken') == md5((string)Tools::getValue('id_customer')))) Latest version in first post if ($id_customer = (int)Tools::getValue('id_customer') && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) using the debug i've a following error on latest version Parse error: syntax error, unexpected ';' in /home/rangelon/public_html/modules/loginascustomer/controllers/front/login.php on line 43 I don't uderstand witch is the correct one because both are marked as 0.7.2 Thanks for any support Edited January 31, 2019 by ANGELO Vintage (see edit history) Share this post Link to post Share on other sites More sharing options...
ANGELO Vintage Posted January 31, 2019 Posted January 31, 2019 Looking inside the code there are errors on parentesys on like 41 of Login.php this is the correct version that works: if (($id_customer = (int)Tools::getValue('id_customer')) && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer))) I hope that could help 1 Share this post Link to post Share on other sites More sharing options...
ANGELO Vintage Posted January 31, 2019 Posted January 31, 2019 On 11/21/2018 at 10:30 PM, Sasni said: @Interesto look here -> @MakeOn edit line 41 in login.php if ($id_customer = (int)Tools::getValue('id_customer')) and it works SUMMARY: To remove errors, you need to edit line 41 if ($id_customer = (int)Tools::getValue('id_customer') && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer)) should be: if ($id_customer = (int)Tools::getValue('id_customer')) don't remove the token check or you have created a backdoor where anyone can login randomly with customer_Id the correct line 41 is: if (($id_customer = (int)Tools::getValue('id_customer')) && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer))) 1 Share this post Link to post Share on other sites More sharing options...
venalsol Posted February 1, 2019 Posted February 1, 2019 13 hours ago, ANGELO Vintage said: don't remove the token check or you have created a backdoor where anyone can login randomly with customer_Id the correct line 41 is: if (($id_customer = (int)Tools::getValue('id_customer')) && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer))) @ANGELO Vintage Thanks you very much for your aportation. I made the changes and the module still working properly. Very appreciated. Share this post Link to post Share on other sites More sharing options...
[email protected] Posted February 3, 2019 Posted February 3, 2019 Thanks for this wonderful module. It's working perfectly in 7.1.5 with the small adjustment on line 41. Share this post Link to post Share on other sites More sharing options...
ANGELO Vintage Posted February 3, 2019 Posted February 3, 2019 On 2/1/2019 at 9:08 AM, venalsol said: @ANGELO Vintage Thanks you very much for your aportation. I made the changes and the module still working properly. Very appreciated. you are welcome 1 Share this post Link to post Share on other sites More sharing options...
michaeldrupa Posted February 14, 2019 Posted February 14, 2019 On 2/3/2019 at 1:56 PM, [email protected] said: Thanks for this wonderful module. It's working perfectly in 7.1.5 with the small adjustment on line 41. Hallo, I am using 1.7.5 and I got error as following: Parse error: syntax error, unexpected ';' in /.../.../public_html/new/modules/loginascustomer/controllers/front/login.php on line 43 Any suggestion how to fix it? Thanks! Share this post Link to post Share on other sites More sharing options...
Sofitec Posted February 20, 2019 Posted February 20, 2019 ho. presta 1.7.5.1 dont work module. you can review please ? Share this post Link to post Share on other sites More sharing options...
André LIU Posted February 27, 2019 Posted February 27, 2019 (edited) On 1/31/2019 at 7:32 PM, ANGELO Vintage said: Looking inside the code there are errors on parentesys on like 41 of Login.php this is the correct version that works: if (($id_customer = (int)Tools::getValue('id_customer')) && (Tools::getValue('xtoken') == $this->module->makeToken($id_customer))) I hope that could help Here's the module installation file with parenthesis fixed. 😉 loginascustomer FIX 20190227.zip Edited February 27, 2019 by André LIU (see edit history) 2 Share this post Link to post Share on other sites More sharing options...
Sofitec Posted February 27, 2019 Posted February 27, 2019 On 2/20/2019 at 5:41 PM, Sofitec said: ho. presta 1.7.5.1 dont work module. you can review please ? i answer my self .... customer not registered.... Share this post Link to post Share on other sites More sharing options...
Soyons Solidaire Posted February 27, 2019 Posted February 27, 2019 (edited) Hello, if it works with the module PS 1.6..x Mahmut Gulerce, do not replace it with the module loginascustomer FIX 20190227 you may have problems with classes Edited February 27, 2019 by Soyons zen (see edit history) Share this post Link to post Share on other sites More sharing options...
marcin_jaworski Posted March 11, 2019 Posted March 11, 2019 public function initContent() in \modules\loginascustomer\controllers\front\login.php have errors in if. this is my working version: login.php Share this post Link to post Share on other sites More sharing options...
AbacoLink Posted June 27, 2019 Posted June 27, 2019 On 3/11/2019 at 3:03 PM, marcin_jaworski said: public function initContent() in \modules\loginascustomer\controllers\front\login.php have errors in if. this is my working version: login.php This worked for v 1.7.5.2. THANKS! Share this post Link to post Share on other sites More sharing options...
MathiasReker Posted June 30, 2019 Posted June 30, 2019 Does not work with PS 1.7.6.0 Share this post Link to post Share on other sites More sharing options...
Sofitec Posted June 30, 2019 Posted June 30, 2019 5 hours ago, MathiasReker said: Does not work with PS 1.7.6.0 Hi. Only re install module. Always you upgrade presta some modules dont work. Re install and ready. Verify.. grettins Share this post Link to post Share on other sites More sharing options...
MathiasReker Posted July 1, 2019 Posted July 1, 2019 23 hours ago, Sofitec said: Hi. Only re install module. Always you upgrade presta some modules dont work. Re install and ready. Verify.. grettins The module is not compatible with PrestaShop 1.7.6.0 because the customer page that the module is hooked to is migrated. Share this post Link to post Share on other sites More sharing options...
b-w-p Posted July 3, 2019 Posted July 3, 2019 Bonjour, Le module fonctionne--t-il sous prestashop 1.7.5.2 ? Merci d'avance Share this post Link to post Share on other sites
Recommended Posts