Code: Select all
Code: Select all
// Get the union of the valid/moderator/admin_forums array (whichever applies) and the elected_formus array. The
// resulting elements are the forums that could be queried. This is necessary because MySQL 3.x doesn't support SQL Unions.
switch ($row['user_level'])
{
case USER:
$queried_forums = array_merge($valid_forums, $elected_forums);
break;
case MOD:
$queried_forums = array_merge($moderator_forums, $elected_forums);
break;
case ADMIN:
$queried_forums = $admin_forums; // Administrators see all forums
break;
default:
message_die(GENERAL_ERROR, 'Attempt to run mail_digests.php for an invalid user level. User level is ' . $row['user_level'] . ' and username is ' . $row['username'], '', __LINE__, __FILE__, $sql);
}
$queried_forums = array_unique($queried_forums);
Code: Select all
// User Levels <- Do not change the values of USER or ADMIN
define('DELETED', -1);
define('ANONYMOUS', -1);
define('USER', 0);
define('ADMIN', 1);
define('MOD', 2);
Do you have a special mod installed which defines new user levels? This is likely the problem (the mod was written to work on a generic board) or your database is corrupt. If this is an ordinary user, the value would be 0. You can use a tool like phpMyAdmin to fix the value to be 0, 1 or 2 as appropriate.