global $_CONFIG;
// Do some pre-checks
- if (!IS_LOGGED_IN()) {
+ if (!IS_MEMBER()) {
// Not a member
return false;
} elseif (!VALIDATE_URL($url)) {
eval($eval);
// Send the notification out
- SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']);
+ return SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']);
}
// Notify the user about the performed action
function SURFBAR_NOTIFY_USER ($messageType, $content) {
+ // Skip notification if userid is zero
+ if ($content['uid'] == 0) {
+ return false;
+ } // END - if
+
// Prepare template name
$templateName = sprintf("member_surfbar_%s", $messageType);
$mailText = LOAD_EMAIL_TEMPLATE($templateName, $content);
// Send the email
- SEND_EMAIL($content['uid'], $subject, $mailText);
+ return SEND_EMAIL($content['uid'], $subject, $mailText);
}
// Translate the URL status
function SURFBAR_TRANSLATE_STATUS ($status) {
global $_CONFIG;
// Is the user 0 and user is logged in?
- if (($uid == 0) && (IS_LOGGED_IN())) {
+ if (($uid == 0) && (IS_MEMBER())) {
// Then use this userid
$uid = $GLOBALS['userid'];
} elseif ($uid == 0) {
$UIDs = array();
// Do we have a current user id?
- if (IS_LOGGED_IN()) {
+ if (IS_MEMBER()) {
// Then add this as well
$UIDs[] = $GLOBALS['userid'];