1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
Oinktube/objects/logoff.php
DanielnetoDotCom 44a9b1b67c Updates
2021-03-05 09:36:44 -03:00

19 lines
569 B
PHP

<?php
global $global, $config;
if(!isset($global['systemRootPath'])){
require_once '../videos/configuration.php';
}
require_once $global['systemRootPath'] . 'objects/user.php';
if (!empty($advancedCustomUser->afterLogoffGoToMyChannel)) {
$redirectUri = User::getChannelLink();
}else if (!empty($advancedCustomUser->afterLogoffGoToURL)) {
$redirectUri = $advancedCustomUser->afterLogoffGoToURL;
}else{
$redirectUri = $global['webSiteRootURL'];
}
User::logoff();
Category::clearCacheCount();
header("location: {$redirectUri}");
exit;