Hi
I am using Opencart 3.0.3.9 download from opencart.
If a user in frontend, enters wrong password for 5 times, account is locked for 1 hour. The issue is that the locked state remains forever indefinitely. Even after 12 or 24 hours it displays warning that account is locked. If it is in the admin side, I will know and I will change password or do something. But from frontend point of view an automatic function needed to reset itself after that particular time.
Please someone help me fix it. Is it a bug in opencart 3.0.3.9?
Also, how to change default 1 hour to something like 15 minutes lock period. After 15 minutes user must be able to login.
For changing 1 hour to 15 minutes, I tired this in catalog/controller/account/login.php but not working:
if ($login_info && ($login_info['total'] >= $this->config->get('config_login_attempts')) && strtotime('-15 minutes') < strtotime($login_info['date_modified'])) {
Thanks
I am using Opencart 3.0.3.9 download from opencart.
If a user in frontend, enters wrong password for 5 times, account is locked for 1 hour. The issue is that the locked state remains forever indefinitely. Even after 12 or 24 hours it displays warning that account is locked. If it is in the admin side, I will know and I will change password or do something. But from frontend point of view an automatic function needed to reset itself after that particular time.
Please someone help me fix it. Is it a bug in opencart 3.0.3.9?
Also, how to change default 1 hour to something like 15 minutes lock period. After 15 minutes user must be able to login.
For changing 1 hour to 15 minutes, I tired this in catalog/controller/account/login.php but not working:
if ($login_info && ($login_info['total'] >= $this->config->get('config_login_attempts')) && strtotime('-15 minutes') < strtotime($login_info['date_modified'])) {
Thanks
That should work. Note that you only get one login attempt for each time period.
@ Add Creative
Changing 1 hour to 15 minutes like that did not work. I will try again confirm here.
Also please let me know why automatic unlock of account after lock period is over is not working
At present user is locked for indefinite period of time.
Please help me fix this issue.
Thanks
Changing 1 hour to 15 minutes like that did not work. I will try again confirm here.
Also please let me know why automatic unlock of account after lock period is over is not working
At present user is locked for indefinite period of time.
Please help me fix this issue.
Thanks
I quickly tested by changing to -2 minutes and it worked as expected. Did you refresh modifications after making the change?
@ ADD Creative
I deleted modification folder files and clicked modification refresh again to rebuild modification again. There seems to be something stuckup. Not sure what it is. After rebuilding modifications freshly, It works perfectly.
Thank you for your answers
One thing I need in this context is:
How to retrieve frontend user account status, if it is locked or unlocked? If countdown is happening, we can display in twig file, the remaining time until unlocked. For example if user is locked for 15 minutes. Suppose if the user tries to login after 12 minutes, we can display " your account is locked. Please try after 3 minutes".
Can you please help me about how to achieve this ?
I deleted modification folder files and clicked modification refresh again to rebuild modification again. There seems to be something stuckup. Not sure what it is. After rebuilding modifications freshly, It works perfectly.
Thank you for your answers
One thing I need in this context is:
How to retrieve frontend user account status, if it is locked or unlocked? If countdown is happening, we can display in twig file, the remaining time until unlocked. For example if user is locked for 15 minutes. Suppose if the user tries to login after 12 minutes, we can display " your account is locked. Please try after 3 minutes".
Can you please help me about how to achieve this ?
strtotime($login_info['date_modified']) - strtotime('-1 hour') gives the number of seconds left. convert to minutes and add to the $this->language->get('error_attempts') string.
If it works, please remember to come back and update the start of this topic title to [SOLVED].
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Legendary Member
Who is online
Users browsing this forum: No registered users and 17 guests