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';
|
return 'ok';
|
||||||
}
|
}
|
||||||
else if ($_POST['action'] === 'logOutAndDestroySession') {
|
else if ($_POST['action'] === 'destroySession') {
|
||||||
$auth->logOutAndDestroySession();
|
$auth->destroySession();
|
||||||
|
|
||||||
return 'ok';
|
return 'ok';
|
||||||
}
|
}
|
||||||
@@ -837,10 +837,7 @@ function showAuthenticatedUserForm(\Delight\Auth\Auth $auth) {
|
|||||||
echo '<button type="submit">Log out everywhere</button>';
|
echo '<button type="submit">Log out everywhere</button>';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
echo '<form action="" method="post" accept-charset="utf-8">';
|
\showDestroySessionForm();
|
||||||
echo '<input type="hidden" name="action" value="logOutAndDestroySession" />';
|
|
||||||
echo '<button type="submit">Log out and destroy session</button>';
|
|
||||||
echo '</form>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showGuestUserForm() {
|
function showGuestUserForm() {
|
||||||
@@ -907,6 +904,8 @@ function showGuestUserForm() {
|
|||||||
echo '<button type="submit">Can reset password?</button>';
|
echo '<button type="submit">Can reset password?</button>';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
|
\showDestroySessionForm();
|
||||||
|
|
||||||
echo '<h1>Administration</h1>';
|
echo '<h1>Administration</h1>';
|
||||||
|
|
||||||
echo '<form action="" method="post" accept-charset="utf-8">';
|
echo '<form action="" method="post" accept-charset="utf-8">';
|
||||||
@@ -1053,6 +1052,13 @@ function showConfirmEmailForm() {
|
|||||||
echo '</form>';
|
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() {
|
function createRolesOptions() {
|
||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user