'NO-ACL' is more clear that we don't have an ACL for the given admin than three aster...
[mailer.git] / inc / mysql-manager.php
index e1ed9ac4ea24b8b7f0b521a8dc84e74adb107acb..aecb0317be43d219a26733d02766037d63177a2a 100644 (file)
@@ -444,8 +444,11 @@ function fetchUserData ($value, $column = 'userid') {
                        // Use cache, so it is fine
                        return true;
                }
-       } elseif ((isUserDataValid()) || (!isExtensionActive('user'))) {
-               // Using cache or absend ext-user is fine here
+       } elseif (!isExtensionActive('user')) {
+               // Absent ext-user is really not good
+               return false;
+       } elseif (isUserDataValid())  {
+               // Using cache is fine
                return true;
        }
 
@@ -1387,7 +1390,7 @@ function getAdminEmail ($adminId) {
 // Get default ACL  of admin id
 function getAdminDefaultAcl ($adminId) {
        // By default an invalid ACL value is returned
-       $data['default_acl'] = '***';
+       $data['default_acl'] = 'NO-ACL';
 
        // Is sql_patches there and was it found in cache?
        if (!isExtensionActive('sql_patches')) {
@@ -1403,6 +1406,8 @@ function getAdminDefaultAcl ($adminId) {
                // Load from database
                $result_admin_id = SQL_QUERY_ESC("SELECT `default_acl` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array(bigintval($adminId)), __FUNCTION__, __LINE__);
+
+               // Do we have an entry?
                if (SQL_NUMROWS($result_admin_id) == 1) {
                        // Fetch data
                        $data = SQL_FETCHARRAY($result_admin_id);