fix: redirect inactive account to auth action page#869
fix: redirect inactive account to auth action page#869datamweb merged 2 commits intocodeigniter4:developfrom
Conversation
|
@sammyskills I cannot reproduce the situation with If an inactive account tries to log in, the system redirects the user to and I get a email with token. |
|
Hi @kenjis, Yes, you will get the error message and it will be redirected to the Try this:
Live scenario:
|
|
@sammyskills "Delete the email_activate identity", this does not seem to happen. The live scenario could happen. But we already set the user active: shield/src/Controllers/RegisterController.php Lines 132 to 133 in 09a7cf3 |
|
Ok, fine. Let's look at it this way.
If you get what I mean, how does a user with a deactivated account "reactivate" their account? |
|
@sammyskills Okay, I got "You must activate your account before logging in."! |
|
Perfect! Now, how does this user activate/reactivate their account? |
datamweb
left a comment
There was a problem hiding this comment.
@sammyskills thank you!
Description
The
isActivated()check works for when a register action has been set in the auth config. Currently, if an inactive account tries to log in, the system redirects the user to the login page with the error message:You must activate your account before logging in.This begs the question: "How do I activate my account?"
This PR fixes this issue by redirecting the user to the auth action page, where a new token is generated and sent to the user's email.
Checklist: