Personal invite link: email field must be prefilled and unchangeable #78

Closed
opened 2026-07-22 12:52:21 +00:00 by thatguygriff · 0 comments
Owner

From the 2026-07-22 user demo.

When someone registers from a personal invite link, the email field should be populated with the invited address and not editable.

Current behaviour

templates/frontend/register-page.php does render a readonly, prefilled email whenever an invite row matches the token — but it keys off $invite !== null, not off the invite actually being redeemable. With open registration enabled, an expired / accepted / revoked invite token still shows its stale email readonly, while the submit handler takes the open-registration branch and reads $_POST['email'] — which the readonly field never submits (it has no name), so the form dead-ends with "Please enter a valid email address."

Wanted

  • Valid pending invite → email prefilled from the invite and locked (server side keeps using the invite's email as the source of truth, ignoring any client-tampered value).
  • Invite that is no longer acceptable + open registration on → normal editable email field.
  • Test coverage for the locked-email rendering and both fallback paths.
**From the 2026-07-22 user demo.** When someone registers from a **personal** invite link, the email field should be populated with the invited address and not editable. ## Current behaviour `templates/frontend/register-page.php` does render a readonly, prefilled email whenever an invite row matches the token — but it keys off `$invite !== null`, not off the invite actually being redeemable. With open registration enabled, an **expired / accepted / revoked** invite token still shows its stale email readonly, while the submit handler takes the open-registration branch and reads `$_POST['email']` — which the readonly field never submits (it has no `name`), so the form dead-ends with "Please enter a valid email address." ## Wanted - Valid pending invite → email prefilled from the invite and locked (server side keeps using the invite's email as the source of truth, ignoring any client-tampered value). - Invite that is no longer acceptable + open registration on → normal editable email field. - Test coverage for the locked-email rendering and both fallback paths.
thatguygriff added the bug label 2026-07-22 12:52:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#78