mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-02 22:27:30 +02:00
Test method 'destroySession' instead of 'logOutAndDestroySession'
This commit is contained in:
@@ -403,8 +403,8 @@ function processRequestData(\Delight\Auth\Auth $auth) {
|
||||
|
||||
return 'ok';
|
||||
}
|
||||
else if ($_POST['action'] === 'logOutAndDestroySession') {
|
||||
$auth->logOutAndDestroySession();
|
||||
else if ($_POST['action'] === 'destroySession') {
|
||||
$auth->destroySession();
|
||||
|
||||
return 'ok';
|
||||
}
|
||||
@@ -837,10 +837,7 @@ function showAuthenticatedUserForm(\Delight\Auth\Auth $auth) {
|
||||
echo '<button type="submit">Log out everywhere</button>';
|
||||
echo '</form>';
|
||||
|
||||
echo '<form action="" method="post" accept-charset="utf-8">';
|
||||
echo '<input type="hidden" name="action" value="logOutAndDestroySession" />';
|
||||
echo '<button type="submit">Log out and destroy session</button>';
|
||||
echo '</form>';
|
||||
\showDestroySessionForm();
|
||||
}
|
||||
|
||||
function showGuestUserForm() {
|
||||
@@ -907,6 +904,8 @@ function showGuestUserForm() {
|
||||
echo '<button type="submit">Can reset password?</button>';
|
||||
echo '</form>';
|
||||
|
||||
\showDestroySessionForm();
|
||||
|
||||
echo '<h1>Administration</h1>';
|
||||
|
||||
echo '<form action="" method="post" accept-charset="utf-8">';
|
||||
@@ -1053,6 +1052,13 @@ function showConfirmEmailForm() {
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
function showDestroySessionForm() {
|
||||
echo '<form action="" method="post" accept-charset="utf-8">';
|
||||
echo '<input type="hidden" name="action" value="destroySession" />';
|
||||
echo '<button type="submit">Destroy session</button>';
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
function createRolesOptions() {
|
||||
$out = '';
|
||||
|
||||
|
Reference in New Issue
Block a user