Chapter 33. Relationships between users

The reluser Table

The reluser table is used to track special relationships between accounts, such as community maintainers/moderators and their communities, which communities a user is allowed to post to, and which users are banned from commenting in specific journals. These relationships are defined as a single character in the database:

A
targetid can administrate userid as a community maintainer
B
targetid is banned in userid, either in comments, or from posting, if userid is a shared or community account
P
targetid can post to userid
M
targetid can moderate the community userid
N
targetid is pre-approved to post in userid without moderation
I
targetid invited userid to the site

The reluser table is a non-clustered global table. Its counterpart, the reluser2 table, is clustered. Clustered relationship types are defined in ljlib.pl and ljlib-local.pl, in the ??? function. The LJ::get_reluser_id description explains the numbering scheme; no reluser2 types can be a single character.