Permissions Schema: Members Table

From XMBdocs
Revision as of 18:05, 26 December 2017 by Miqrogroove (talk | contribs) (Created page with "Each board user registers through the member.php script, which sets values in two permissions columns. After the account is created, these values can be modified only by usin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Each board user registers through the member.php script, which sets values in two permissions columns. After the account is created, these values can be modified only by using the cp.php script. There are also two user-controlled columns that offer limited social access control.

Status

members.status is a VARCHAR(35) column always set to 'Member' at registration. The only exception is if the table is empty, then the first new user is always granted 'Super Administrator' status. All possible values for this column are listed below:

  • 'Super Administrator'
  • 'Administrator'
  • 'Super Moderator'
  • 'Moderator'
  • 'Member'
  • 'Banned'

These string values are not formally enumerated in the code base, however they do have assigned integer values that changed as of version 1.9.9. This will become more formal in version 1.9.11 to accommodate future uses and flexibility. See the Best Practices section below to learn how to make your code compatible with current and future versions.

Ban

members.ban is a VARCHAR(15) column always set to '' (empty string) at registration. All possible values for this column are listed below:

  • '' (empty string)
  • 'u2u'
  • 'posts'
  • 'both'

These string values are never enumerated in the code base. This column is always checked before a user accesses the post.php or u2u.php scripts. For example, a user may only create a new forum thread or reply if the ban column value in their row is set to '' or 'u2u'.

The value in the members.ban column is never effective for a user whose members.status column value is set to "Banned". The latter value is a global override to deny all permissions.

~Ignoreu2u

members.ignoreu2u (doc stub) a TEXT column.

Invisible

members.invisible is a SET column always set to '0' at registration. All possible values for this column are listed below:

  • '0'
  • '1'

Note: The MySQL SET data type is equivalent to a string and is not capable of storing integer values.

The only purpose of this column is to control who may see each user in the Who's Online lists of the index.php and misc.php scripts. Likewise, the user's Online Status display is controlled for the buddy, profile, u2u, viewthread, and other features. After registration, each user can switch their own value using the misc.php script. When the value is switched to '1', the user's entry in the Who's Online list is displayed only to users who have 'Administrator' or 'Super Administrator' status. When the default value '0' is used, the user's online status is displayed to anyone permitted to view the website.