This topic is locked
[SOLVED]

Force new user to change password

5/27/2024 4:56:45 AM
PHPRunner General questions
P
PK author

Hello All,
My users are created in a diffrent app and then with their user ID they can enter the web app. I have a field in the users table called 'first_time' which is set to true when a new user is created.
New when the new user log in I want to force him to the changepwd page.
By the way I a using 2FA with email option. I tried to redirect on after sucessful login but it seems to interfer with 2FA.
Any ideas in how to achieve this?

Thanks
Percy

P
PK author 5/27/2024

So I have moved one step closer to what I want to achieve.
I did the redirect on the dashbord before display and I am able to the change the password successfully.
Now I am unable to leave the changepwd_success page. When I click the "Back" button, it takes me back o the change password page.
So I created by own custom button to try to get back to the dashboard

img alt

But this method also produces an error that I cannot see

img alt
When, I click for details, nothing...I am thinking the changepwd page is created in a way not to allow users to navigate away from it for security reasons.

So how do I get around this?
Thanks

Percy

C
cristi 5/27/2024

You're not giving too much details - what custom code did you write, in which events???

At first sight did you tried to use this event???

Please, if you want others to give you their time and ideas you should write all the details and at least some minimum code that can be tested and the error reproduced....

P
PK author 5/29/2024

Hi cristi, thanks for the useful advise. I found another way to achieve what I wanted

Thanks agian