public function lblSignOut_Click() { QApplication::Logout(); }
public static function Authenticate($intModuleId = null) { // If logins have been disabled for this site, log the user out if (QApplication::$TracmorSettings->DisableLogins) { QApplication::Logout(); } if (array_key_exists('intUserAccountId', $_SESSION)) { $objUserAccount = UserAccount::Load($_SESSION['intUserAccountId']); if ($objUserAccount) { // Assign the UserAccount object to the globally available QApplication QApplication::$objUserAccount = $objUserAccount; // If they are not in the admin panel if ($intModuleId) { $objRoleModule = RoleModule::LoadByRoleIdModuleId($objUserAccount->RoleId, $intModuleId); // If they do not have access to this module if (!$objRoleModule->AccessFlag) { QApplication::Redirect('../common/trespass.php'); } else { QApplication::$objRoleModule = $objRoleModule; } } elseif (!$objUserAccount->AdminFlag) { QApplication::Redirect('../common/trespass.php'); } } else { QApplication::Redirect('../common/trespass.php'); } } else { QApplication::Redirect('../login.php?strReferer=' . urlencode(QApplication::$RequestUri)); } }
<?php require '../../includes/prepend.inc.php'; QApplication::Logout();