X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fadmins_functions.php;h=a981f8d148a093f49707dd8e42513f138a9b2ca7;hp=c0d4c13023df4398210569cb391dad0960c30404;hb=b29dab42eab7c64ca1945eb70fa7713f8898f6ae;hpb=0eaf34823f30502739d39efe2b592cb223089ed6 diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index c0d4c13023..a981f8d148 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -115,26 +115,28 @@ function ADMINS_CHECK_ACL($act, $wht) { } // END - if // Return value + //* DEBUG: */ print __FUNCTION__."[".__LINE__."]:act={$act},wht={$wht},default={$default},acl_mode={$acl_mode}
\n"; return $ret; } // Create email link to admins's account function ADMINS_CREATE_EMAIL_LINK ($email, $mod="admin") { - if (strpos("@", $email) > 0) { + // Is it an email? + if (strpos($email, "@") !== false) { // Create email link - $result = SQL_QUERY_ESC("SELECT id + $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins` -WHERE email='%s' LIMIT 1", +WHERE `email`='%s' LIMIT 1", array($email), __FUNCTION__, __LINE__); // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Load userid - list($uid) = SQL_FETCHROW($result); + list($aid) = SQL_FETCHROW($result); // Rewrite email address to contact link - $email = "{!URL!}/modules.php?module=".$mod."&what=user_contct&uid=".bigintval($uid); - } + $email = "{!URL!}/modules.php?module=".$mod."&what=admins_contct&admin=".bigintval($aid); + } // END - if // Free memory SQL_FREERESULT($result);