$user info: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with "{{Needs work}} {{TOCright}} ==$user_info== These are all the keys defined for $user_info in loadUserSettings(). Some are self-explanatory, for sure. ===groups=== ===possibly_...")
 
 
(9 intermediate revisions by the same user not shown)
Line 2: Line 2:
{{TOCright}}
{{TOCright}}
==$user_info==
==$user_info==
These are all the keys defined  for $user_info in loadUserSettings(). Some are self-explanatory, for sure.
These are all the keys defined  for $user_info in loadUserSettings(). Some are self-explanatory, for sure.


===groups===
===groups===
array. All possible membergroups attached too a user. Keys do not matter. Values are the groups, sanitized as int, just in case. This includes:
* Primary group
* Post count group
* Additional groups. These are stored in the database as a comma-delimited string.


===possibly_robot===
===possibly_robot===
bool. Is true if the agent matches a known spider if the feature is enabled, and if disabled, makes an educated guess.


===id===
===id===
int Corresponds to the member's database value 'id_member'.


===username===
===username===
string. Login name may be different than display name.


===name===
===name===
string. Their displayed name.


===email===
===email===
string


===passwd===
===passwd===
string


===language===
===language===
string


===is_guest===
===is_guest===
bool


===is_admin===
===is_admin===
bool


===theme===
===theme===


===last_login===
===last_login===
int. Unix timestamp.


===ip===
===ip===
{{code|$_SERVER['REMOTE_ADDR']}}


===ip2===
===ip2===
{{code|$_SERVER['BAN_CHECK_IP']}}


===posts===
===posts===
int. Post count.


===time_format===
===time_format===
string. Custom format for strtftime().


===time_offset===
===time_offset===
int. User's hourly offset from the forum time.


===avatar===
===avatar===
array
* url: string
* filename: string
* custom_dir: bool
* id_attach: int


===smiley_set===
===smiley_set===


===messages===
===messages===
int. Number of PMs they have.


===unread_messages===
===unread_messages===
int. Number of unread PMs they have.


===total_time_logged_in===
===total_time_logged_in===
Line 52: Line 78:


===ignoreboards===
===ignoreboards===
String. The list of boards they WANT to see delimited by commas.
String. The list of boards they have ignored delimited by commas.


===ignoreusers===
===ignoreusers===
Line 60: Line 86:


===warning===
===warning===
int. Their warning points.


===permissions===
===permissions===


===query_see_board===
===query_see_board===
The list of all the boards they can see as part of a prepared SQL statement.


===query_wanna_see_board===
===query_wanna_see_board===
Line 69: Line 97:


===mod_cache===
===mod_cache===
Moderator cache.
[[Moderator cache]].


===is_mod===
===is_mod===

Latest revision as of 23:28, 7 February 2020

$user_info

These are all the keys defined for $user_info in loadUserSettings(). Some are self-explanatory, for sure.

groups

array. All possible membergroups attached too a user. Keys do not matter. Values are the groups, sanitized as int, just in case. This includes:

  • Primary group
  • Post count group
  • Additional groups. These are stored in the database as a comma-delimited string.

possibly_robot

bool. Is true if the agent matches a known spider if the feature is enabled, and if disabled, makes an educated guess.

id

int Corresponds to the member's database value 'id_member'.

username

string. Login name may be different than display name.

name

string. Their displayed name.

email

string

passwd

string

language

string

is_guest

bool

is_admin

bool

theme

last_login

int. Unix timestamp.

ip

$_SERVER['REMOTE_ADDR']

ip2

$_SERVER['BAN_CHECK_IP']

posts

int. Post count.

time_format

string. Custom format for strtftime().

time_offset

int. User's hourly offset from the forum time.

avatar

array

  • url: string
  • filename: string
  • custom_dir: bool
  • id_attach: int

smiley_set

messages

int. Number of PMs they have.

unread_messages

int. Number of unread PMs they have.

total_time_logged_in

buddies

String. The list of their buddies delimited by commas.

ignoreboards

String. The list of boards they have ignored delimited by commas.

ignoreusers

String. The list of users they have opted to ignore delimited by commas.

  • In SMF 1.1.x only PMs get ignored.
  • In SMF 2.0.x and onwards, this feature has been improved to also hide the posts of the ignored user.

warning

int. Their warning points.

permissions

query_see_board

The list of all the boards they can see as part of a prepared SQL statement.

query_wanna_see_board

The list of boards they WANT to see as part of a prepared SQL statement.

mod_cache

Moderator cache.

is_mod

Boolean. Is false except in boards where the member is a moderator. It is always set.



Advertisement: