Skip to content
Snippets Groups Projects
Commit 6274d08a authored by Jared Hancock's avatar Jared Hancock
Browse files

Allow guests to sign out

Otherwise, a user's session cannot be voluntarily destroyed
parent 3eac4a8c
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
$title=($cfg && is_object($cfg) && $cfg->getTitle())?$cfg->getTitle():'osTicket :: Support Ticket System';
$signin_url = ROOT_PATH . "login.php"
. ($thisclient ? "?e=".urlencode($thisclient->getEmail()) : "");
$signout_url = ROOT_PATH . "logout.php?auth=".$ost->getLinkToken();
header("Content-Type: text/html; charset=UTF-8\r\n");
?>
<!DOCTYPE html>
......@@ -51,13 +53,16 @@ header("Content-Type: text/html; charset=UTF-8\r\n");
?>
<a href="<?php echo ROOT_PATH; ?>account.php">Profile</a> |
<a href="<?php echo ROOT_PATH; ?>tickets.php">Tickets <b>(<?php echo $thisclient->getNumTickets(); ?>)</b></a> -
<a href="<?php echo ROOT_PATH; ?>logout.php?auth=<?php echo $ost->getLinkToken(); ?>">Log Out</a>
<a href="<?php echo $signout_url; ?>">Sign Out</a>
<?php
} elseif($nav) {
if ($cfg->getClientRegistrationMode() == 'public') { ?>
Guest User | <?php
}
if ($cfg->getClientRegistrationMode() != 'disabled') { ?>
if ($thisclient && $thisclient->isValid() && $thisclient->isGuest()) { ?>
<a href="<?php echo $signout_url; ?>">Sign Out</a><?php
}
elseif ($cfg->getClientRegistrationMode() != 'disabled') { ?>
<a href="<?php echo $signin_url; ?>">Sign In</a>
<?php
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment