X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fautopurge_functions.php;h=275cdfcacc43349af7403147c36e01a0be0fe5b9;hp=dcdadc845370d6a65c614527053211c48f7c58da;hb=e3934352dffa6eb9da59a137ae1a9414e5b4d80b;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index dcdadc8453..275cdfcacc 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -1,7 +1,7 @@ $points), $userid); + sendEmail($userid, '{--MEMBER_AUTOPURGE_SUBJECT--}', $message); +} + +// Checks wether auto-purging is enabled +function isAutoPurgingActive () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getConfig('auto_purge_active') == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Wrapper for 'autopurge_inactive +function getAutopurgeInactive () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getConfig('autopurge_inactive') == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Checks wether purging of inactive accounts is enabled +function isAutopurgeInactiveEnabled () { + // Do we have cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getAutopurgeInactive() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; } // [EOF]