Error when resettin...
 
Notifications
Clear all

Error when resetting password: "User is not logged in"

2 Posts
2 Users
0 Reactions
682 Views
(@tommih)
Posts: 44
Trusted Member
Topic starter
 

Hello,

When trying to reset a password with a reset code, we get the error: "User is not logged in". I don't understand what this means since clearly the user can't be logged in if they need to reset their password. The code I use for this is:

User.ChangePassword(0resetUsernameField.textresetCodeField.textresetPasswordField.text, (bool successstring error) => {
            if (success){
                //Do login stuff
            } else {
                Debug.LogError("Error resetting password: error);
            }
        });

 
Posted : 19/02/2016 6:25 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

May be your user didn't activate his account yet before trying to change password? It seems the only situation when you could get that error in ChangePassword, anyway probably there's no need to double check IsLogged so you can edit /users.php and comment the lines 606, 623 and 624 (basically there shouldn't be the "if" statement for IsLogged) and leave only the code that you see inside the statement "if ($LoggedAccount->IsLogged()) { .. }" at line 607.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 19/02/2016 7:04 pm
Share: