donjakobo/A3M

Force reset password

Closed this issue · 5 comments

Firstly, does the reset password feature work for anyone, I cannot seem to be getting it to work.

I can ask to reset password, receive the email, DB is updates column resetsenton, follow the link in the email, enter the captcha on the security check page and then I get a big ugly error:

A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$forceresetpass
Filename: account/Authentication.php
Line Number: 200

This leads us to the following section of code:

if($account->forceresetpass)
{
    //redirect to password page
    redirect(base_url('account/password/'));
}

forceresetpass looks like it would be set by a function in Account_model.php called force_reset_password, which is not actually used anywhere. I guess it should have a table column too that is either TRUE or FALSE (as seen in lines 303-320 in Account_model.php).

I resolved the issue for now by changing line number 200 in Authentication.php to:

if($account->resetsenton)

OK, you are mixing two different issues here together. Force reset password is something that you set in the admin. Second what you seem to be talking about is forgot password feature. I'm trying to replicate your error right now, so I'll be back later with more if I can replicate.

Wasn't able to reproduce. Please provide more detailed step to reproduce this error.

Also which version is this? I'm guessing 2-dev from force reset password.

ci3-beta with environment set to development. Force reset password is located in the files above that I mentioned and the code is present in the ci3-beta branch.

This feature should now work fully.