mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-11 19:46:22 +02:00
Extract form for email verification into separate method in 'tests'
This commit is contained in:
@ -594,17 +594,7 @@ function showGuestUserForm() {
|
|||||||
echo '<button type="submit">Register</button>';
|
echo '<button type="submit">Register</button>';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
echo '<form action="" method="post" accept-charset="utf-8">';
|
showConfirmEmailForm();
|
||||||
echo '<input type="hidden" name="action" value="confirmEmail" />';
|
|
||||||
echo '<input type="text" name="selector" placeholder="Selector" /> ';
|
|
||||||
echo '<input type="text" name="token" placeholder="Token" /> ';
|
|
||||||
echo '<select name="login" size="1">';
|
|
||||||
echo '<option value="0">Sign in automatically? — No</option>';
|
|
||||||
echo '<option value="1">Sign in automatically? — Yes</option>';
|
|
||||||
echo '<option value="2">Sign in automatically? — Yes (and remember)</option>';
|
|
||||||
echo '</select> ';
|
|
||||||
echo '<button type="submit">Confirm email</button>';
|
|
||||||
echo '</form>';
|
|
||||||
|
|
||||||
echo '<form action="" method="post" accept-charset="utf-8">';
|
echo '<form action="" method="post" accept-charset="utf-8">';
|
||||||
echo '<input type="hidden" name="action" value="forgotPassword" />';
|
echo '<input type="hidden" name="action" value="forgotPassword" />';
|
||||||
@ -702,6 +692,20 @@ function showGuestUserForm() {
|
|||||||
echo '</form>';
|
echo '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showConfirmEmailForm() {
|
||||||
|
echo '<form action="" method="post" accept-charset="utf-8">';
|
||||||
|
echo '<input type="hidden" name="action" value="confirmEmail" />';
|
||||||
|
echo '<input type="text" name="selector" placeholder="Selector" /> ';
|
||||||
|
echo '<input type="text" name="token" placeholder="Token" /> ';
|
||||||
|
echo '<select name="login" size="1">';
|
||||||
|
echo '<option value="0">Sign in automatically? — No</option>';
|
||||||
|
echo '<option value="1">Sign in automatically? — Yes</option>';
|
||||||
|
echo '<option value="2">Sign in automatically? — Yes (and remember)</option>';
|
||||||
|
echo '</select> ';
|
||||||
|
echo '<button type="submit">Confirm email</button>';
|
||||||
|
echo '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
function createRolesOptions() {
|
function createRolesOptions() {
|
||||||
$roleReflection = new ReflectionClass(\Delight\Auth\Role::class);
|
$roleReflection = new ReflectionClass(\Delight\Auth\Role::class);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user