// Load userid
list($adminId) = SQL_FETCHROW($result);
- // Rewrite email address to contact link
- $email = '{%url=modules.php?module=' . $mod . '&what=admins_contct&admin=' . bigintval($adminId) . '%}';
+ // Call this function again
+ $email = generateAdminEmailLink($adminId, $mod);
} // END - if
// Free memory
SQL_FREERESULT($result);
- } elseif ((is_int($email)) && ($email > 0)) {
+ } elseif (isValidUserId($email)) {
// Direct id given
- $email = '{%url=modules.php?module=' . $mod . '&what=admins_contct&admin=' . bigintval($email) . '%}';
+ $email = '{%url=modules.php?module=' . $mod . '&what=admins_contct&id=' . bigintval($email) . '%}';
+ } else {
+ // This is strange and needs fixing
+ debug_report_bug(__FUNCTION__, __LINE__, 'email[' . gettype($email) . ']=' . $email . ',mod=' . $mod . ' - This should not happen.');
}
// Return rewritten (?) email address