File: //opt/cloudlinux/alt-php54/root/usr/share/pear/RVSeagullMod/modules/blogweb/www/sglRedirect.php
<?php
$sglUrl = str_replace('blogweb/', '', $serendipity['baseURL']);
if (isset($serendipity['GET']['adminModule']) && $serendipity['GET']['adminModule'] == 'logout') {
$sglUrl = $sglUrl .= 'index.php/user/login/action/logout/';
header('Status: 302 Found');
header("Location: " . $sglUrl);
} elseif ($serendipity['GET']['adminModule'] == 'users') {
$sglUrl = $sglUrl .= 'index.php/user';
header('Status: 302 Found');
header("Location: " . $sglUrl);
} else {
if (IS_installed === true) {
/* Check author token to insure session not hijacked */
/*if (!isset($_SESSION['author_token']) || !isset($serendipity['COOKIE']['author_token']) ||
($_SESSION['author_token'] !== $serendipity['COOKIE']['author_token'])) {
$_SESSION['serendipityAuthedUser'] = false;
serendipity_session_destroy();
}*/
if (!serendipity_userLoggedIn()) {
// Try again to log in, this time with enabled external authentication event hook
header('Status: 302 Found');
header("Location: " . $sglUrl);
}
}
}
?>