afterLogoffGoToMyChannel)) { $redirectUri = User::getChannelLink(); } elseif (!empty($advancedCustomUser->afterLogoffGoToURL)) { $redirectUri = $advancedCustomUser->afterLogoffGoToURL; } else { $redirectUri = $global['webSiteRootURL']; } User::logoff(); Category::clearCacheCount(); header("location: {$redirectUri}"); exit;