X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=1ecde451344afe4d7d675aed8e8492135b67667f;hb=e7627208baf6669248953b5b07aa67d0724dea75;hp=f8b068dc3523cd20ea144b4de3b66d1935c90445;hpb=5e59f0f3acb5645439eb8ca5f8030b17931f1102;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index f8b068dc35..1ecde45134 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1,7 +1,7 @@ '; - debug_print_backtrace(); - die(' 1)); +} + +// Setter for current userid +function setCurrentUserId ($userid) { + $GLOBALS['current_userid'] = bigintval($userid); +} + +// Getter for current userid +function getCurrentUserId () { + // Userid must be set before it can be used + if (!isCurrentUserIdSet()) { + // Not set + debug_report_bug('User id is not set.'); + } // END - if + + // Return the userid + return $GLOBALS['current_userid']; +} + +// Checks if current userid is set +function isCurrentUserIdSet () { + return isset($GLOBALS['current_userid']); +} + +// Checks wether we are debugging template cache +function isDebuggingTemplateCache () { + return (getConfig('DEBUG_TEMPLATE_CACHE') == 'Y'); +} + // [EOF] ?>