Merge pull request 'Lock the registration email to the invite only when the invite is redeemable' (#82) from fix/invite-email-lock into main
CI / Build Plugin Zip (push) Successful in 2m45s
CI / Tests (PHP 8.1) (push) Successful in 40s
CI / Tests (PHP 8.2) (push) Successful in 38s
CI / No Debug Code (push) Successful in 2s
CI / Coding Standards (push) Successful in 2m45s
CI / PHPStan (push) Successful in 2m50s
CI / Tests (PHP 8.3) (push) Successful in 2m35s

Reviewed-on: #82
This commit was merged in pull request #82.
This commit is contained in:
2026-07-22 13:31:17 +00:00
4 changed files with 54 additions and 5 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ if (! defined('ABSPATH')) {
/**
* @var \Unsupervised\Schedular\Auth\Invite|null $invite
* @var bool $inviteValid Whether $invite can still be redeemed — only then is the email fixed.
* @var string $token Raw invite token from the request (only its hash is stored).
* @var bool $canRegister
* @var bool $open Whether open (self-approval) registration is enabled.
@@ -43,7 +44,7 @@ if (! defined('ABSPATH')) {
<p>
<label for="us-reg-email"><?php esc_html_e('Email', 'unsupervised-schedular'); ?></label>
<?php if ($invite !== null) : ?>
<?php if ($inviteValid && $invite !== null) : ?>
<input type="email" id="us-reg-email" value="<?php echo esc_attr($invite->email); ?>" readonly>
<?php else : ?>
<input type="email" name="email" id="us-reg-email" autocomplete="email" required>