mirror of
git://f0xx.org/ac/ac-ms-identity
synced 2026-07-30 03:38:12 +03:00
feat(identity): verify email TTL, resend API, mail TTL label
Signed-off-by: Anton Afanasyeu <a.afanasieff@gmail.com>
This commit is contained in:
@@ -19,6 +19,19 @@ if ($action === 'verify') {
|
||||
json_out($result, $result['ok'] ? 200 : 400);
|
||||
}
|
||||
|
||||
if ($action === 'resend') {
|
||||
$result = AuthRegistration::resendVerification((string) ($data['email'] ?? ''));
|
||||
json_out($result, $result['ok'] ? 200 : 400);
|
||||
}
|
||||
|
||||
if ($action === 'pending') {
|
||||
$pending = AuthRegistration::pendingVerification((string) ($data['email'] ?? ''));
|
||||
if ($pending === null) {
|
||||
json_out(['ok' => false, 'error' => 'not_pending'], 404);
|
||||
}
|
||||
json_out($pending, ($pending['ok'] ?? false) ? 200 : 410);
|
||||
}
|
||||
|
||||
$email = (string) ($data['email'] ?? '');
|
||||
$password = (string) ($data['password'] ?? '');
|
||||
$username = (string) ($data['username'] ?? '');
|
||||
|
||||
Reference in New Issue
Block a user