]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/admins_functions.php
Extension ext-admins improved:
[mailer.git] / inc / libs / admins_functions.php
index 27c0a104912ee3a3a3b4da0d0711f0014e1daddb..407308222aa1bd1ef4551b88dd9f13fe86f263a8 100644 (file)
@@ -153,15 +153,18 @@ LIMIT 1",
                        // 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