Skip to content

Fix the reset link in the activation emails - #33

Merged
bonelifer merged 1 commit into
masterfrom
activation-reset-emails
Sep 28, 2026
Merged

bonelifer merged 1 commit into
masterfrom
activation-reset-emails

Conversation

@bonelifer

Copy link
Copy Markdown
Contributor

Follow-up to #32, fixing the two edge cases found when testing it.

User activation. The reset link could never be used. The reset form refuses inactive users, and activating the account through ucp.php?mode=activate clears reset_token, so the link failed both before and after activation. This email no longer gets a token or a link. It tells the user to set a password with "Forgot password" after activating. The ACP messages for this mode say the same.

Admin activation. Clicking the link before an administrator activates the account shows "The password reset token you supplied is invalid or has expired", although the same link works after activation. The email now says the link works only once the account is activated, and points to "Forgot password" if activation happens after the link expires.

No change for boards without activation, or when the admin ticks "activate" on the Add User page.

Claude tested this on a clean phpBB 3.3.19 board (PHP 8.4, SQLite), creating one user per case through the ACP page and following the links in the emails that were actually sent:

  • No activation: link works, new password logs in.
  • User activation: no link or token in the email. Activate, then "Forgot password", reset, and log in all work.
  • Admin activation, activated later: link refused before activation, works after it.
  • Admin activation, "activate" ticked: link works, new password logs in.

Investigated and written by Claude on behalf of William Jacoby (bonelifer).

With user activation, the reset link could never be used: the reset
form refuses inactive users, and activating the account clears
reset_token. That email no longer gets a token or link; it tells the
user to set a password with "Forgot password" after activating.

With admin activation, the link only works once an administrator has
activated the account. The email now says so, and points to "Forgot
password" if activation comes after the link expires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit 3eb6cda into master Sep 28, 2026
7 checks passed
@bonelifer
bonelifer deleted the activation-reset-emails branch September 28, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants