mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-31 13:20:11 +02:00
Also test return values of 'confirmEmail' and 'confirmEmailAndSignIn'
This commit is contained in:
@@ -151,13 +151,12 @@ function processRequestData(\Delight\Auth\Auth $auth) {
|
|||||||
// do not keep logged in after session ends
|
// do not keep logged in after session ends
|
||||||
$rememberDuration = null;
|
$rememberDuration = null;
|
||||||
}
|
}
|
||||||
$auth->confirmEmailAndSignIn($_POST['selector'], $_POST['token'], $rememberDuration);
|
|
||||||
|
return $auth->confirmEmailAndSignIn($_POST['selector'], $_POST['token'], $rememberDuration);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$auth->confirmEmail($_POST['selector'], $_POST['token']);
|
return $auth->confirmEmail($_POST['selector'], $_POST['token']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'ok';
|
|
||||||
}
|
}
|
||||||
catch (\Delight\Auth\InvalidSelectorTokenPairException $e) {
|
catch (\Delight\Auth\InvalidSelectorTokenPairException $e) {
|
||||||
return 'invalid token';
|
return 'invalid token';
|
||||||
|
Reference in New Issue
Block a user