We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

password reset email link fix | Forum

Achim
Achim Jan 29 '14

Quote from Aliia ... However when SMTP was enabled and Cron was running every minute, ow_reset_password table was getting cleared every time cron ran, thus making reset codes invalid. ...
So will it help to set cron to 2 minutes? Or to disable SMTP and use the PHP mail?
MarkieMark67
MarkieMark67 Jan 29 '14
Disable SMTP is the easiest option... 
tammy harris
tammy harris May 9 '14
if you update the script you will need to re put the code in for it to work again
tammy harris
tammy harris May 10 '14
try to double the time 
tammy harris
tammy harris May 11 '14
does it work now???
Pete
Pete May 11 '14
Tammy read the message I have just sent you .
Steve Winter
Steve Winter May 11 '14
Quote from Justin Jones Just tried again. It works sometimes, other times not. It works on the first attempt to reset and even the second sometimes, but usually fails on the third attempt. So it is not reliable. Something is interfering - I believe something is deleting the db, possibly related to the Oxwall cron job that runs every minute.

My site works just fine with the cron set for every 5 minutes.


Steve

ross Team
ross May 12 '14
Justin, can you please specify what have you indicated as a time value: 

$example->andFieldGreaterThan(self::EXPIRATION_TS, time());


in ow_system_plugins/base/bol/user_reset_password_dao.php


and how often have you tried to restore your password


Also what you have in ow_system_plugins/base/cron.php , here: 

  $this->addJob('deleteExpiredPasswordResetCodes', 10); Is it 10 or something else?

ross Team
ross May 15 '14
Justin, when you indicated 43200 this number means that the link will be valid within 43200 MINUTES. within this period you won't be able to restore your password again. 

This code : 


$example->andFieldGreaterThan(self::EXPIRATION_TS, time() + 43200);


is greater than this one, it is more important for the software functionality: 


$this->addJob('deleteExpiredPasswordResetCodes', 10);


moreover, I have tried with the default settings and without any code changes to restore my password 10 times on my test website and oxwall.org demo, and everytime the link was valid. 


ross Team
ross May 18 '14
Justin, if you put 3600 it is minutes not seconds. If your cron command is set to 5 minutes. 

Basically when a user tries to restore his/her password he waits for the e-mail after all. 


If you set it for 60 (minutes) then the link will be valid for an hour, but within this period he won't be able to do the restore again. So it is up to you, what time to indicate there. I would leave it empty. Because as soon as a member restores his password he goes to the e-mail to check it. Hope I made myself clear. 

Kalmnee
Kalmnee Jan 21 '16

users forget password dosent work ..... 

Something went wrong!
To get the error details follow these steps:
- Open ow_includes/config.php file and set DEBUG_MODE to true
- Reproduce your last action.

Error details: Type: Exception Message: Could not instantiate mail function. File: /home/myweb/public_html/ow_libraries/vendor/phpmailer/phpmailer/class.phpmailer.php Line: 1430 Trace: #0 /home/myweb/public_html/ow_libraries/vendor/phpmailer/phpmailer/class.phpmailer.php(1302): PHPMailer->mailSend('Date: Thu, 21 J...', 'This is a multi...') #1 /home/myweb/public_html/ow_libraries/vendor/phpmailer/phpmailer/class.phpmailer.php(1180): PHPMailer->postSend() #2 /home/myweb/public_html/ow_system_plugins/base/bol/mail_service.php(272): PHPMailer->send() #3 /home/myweb/public_html/ow_core/mailer.php(97): BOL_MailService->send(Object(BASE_CLASS_Mail)) #4 /home/myweb/public_html/ow_system_plugins/base/bol/user_service.php(1463): OW_Mailer->send(Object(BASE_CLASS_Mail)) #5 /home/myweb/public_html/ow_system_plugins/base/controllers/user.php(68): BOL_UserService->processResetForm(Array) #6 [internal function]: BASE_CTRL_User->forgotPassword(Array) #7 /home/myweb/public_html/ow_core/request_handler.php(266): call_user_func_array(Array, Array) #8 /home/myweb/public_html/ow_core/application.php(353): OW_RequestHandler->dispatch() #9 /home/myweb/public_html/index.php(76): OW_Application->handleRequest() #10 {main}



The Forum post is edited by Kalmnee Jan 21 '16
ross Team
ross Jan 24 '16
you don't have phpmail function on your server, contact your hosting provider to enable it. 
Pages: « 1 2 3