$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_...")
 
No edit summary
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


===username===
===username===
string


===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===
Line 29: Line 42:


===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===

Revision as of 04:43, 4 May 2012

$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

username

string

name

string. Their displayed name.

email

string

passwd

string

language

string

is_guest

bool

is_admin

bool

theme

last_login

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 WANT to see 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

permissions

query_see_board

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: