Moderator cache

From Online Manual

Jump to: navigation, search

Loaded every page, this contains vital informastion on the user's moderating powers.

Definitions

  • time - the last time (timestamp) the mod_cache array has been rebuilt;
  • id - the user id;
  • gq - group query, contains a pre-made query for groups the user is moderator of, it can be:
    • 0=1 - moderator of no groups;
    • 1=1 - allowedTo('manage_membergroups');
    • id_group IN ({list_of_groups}) - list_of_groups is a list (comma separated) of groups the user is moderator of;
  • bq - boards query, contains a pre-made query of boards the user has moderation powers, it can be:
    • 0=1 - moderator of no boards;
    • 1=1 - allowedTo('moderate_forum');
    • id_board IN ({list_of_boards}) - list_of_boards is a list (comma separated) of boards the user has moderation powers;
  • ap - approve posts, an array of boards the user can approve posts in, in other words the return of boardsAllowedTo('approve_posts');
  • mb - moderator boards, an array of boards the user is moderator of;
  • mq - moderator query, a pre-made query of boards the user is moderator of, it can be:
    • 0=1 - moderator of no boards;
    • 1=1 - allowedTo('moderate_forum');
    • b.id_board IN ({list_of_boards}) - list_of_boards is a list (comma separated) of boards the user is moderator of.

Access

The entire moderator cache is stored in $user_info['mod_cache'] and is cached in $_SESSION['mc'].