X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=bbe9c0c87932b3b860a92bd60da0199b6946970c;hp=7068fdc8bb5baee5a5d0b658101fd58d621ccfe5;hb=12d1414024e87153a133bb1d0fe0185ca2c700c5;hpb=27cffdf12876899294d61de9cdc0f4f3d20d1eb4 diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 7068fdc8bb..bbe9c0c879 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -423,5 +423,26 @@ function isConfigLocalLoaded () { return ((isset($GLOBALS['config_local_loaded'])) && ($GLOBALS['config_local_loaded'] === true)); } +// Checks wether a nickname or userid was entered and caches the result +function isNicknameUsed ($userid) { + // Default is false + $isUsed = false; + + // Is the cache there + if (isset($GLOBALS['cache_probe_nicknames'][$userid])) { + // Then use it + $isUsed = $GLOBALS['cache_probe_nicknames'][$userid]; + } else { + // Determine it + $isUsed = ((EXT_IS_ACTIVE('nickname')) && ((''.round($userid).'') != $userid)); + + // And write it to the cache + $GLOBALS['cache_probe_nicknames'][$userid] = $isUsed; + } + + // Return the result + return $isUsed; +} + // [EOF] ?>