members
Packages
Interfaces
Classes
Files

Class: User

Source Location: /members/user.class.php [line 37]

Class Overview


This class manage user, it provide you methods to get or modify user informations, moreover methods allow you to control user authorizations

Author(s):



Class Details

This class manage user, it provide you methods to get or modify user informations, moreover methods allow you to control user authorizations

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor User [line 44]

User User( array $session_data, &$groups_info, array $groups_info)
Sets global authorizations which are given by all the user groups authorizations.

Parameters:

array   $session_data  
array   $groups_info  
   &$groups_info  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method check_auth [line 121]

boolean check_auth( array $array_auth_groups, int $authorization_bit)
Get the authorizations given by all the user groups. Then check the authorization.

Tags:

  • return: True if authorized, false otherwise.

Parameters:

array   $array_auth_groups   The array passed to check the authorization.
int   $authorization_bit   Value of position bit to check the authorization. This value has to be a multiple of two. You can use this simplified scripture : 0x01, 0x02, 0x04, 0x08 to set a new position bit to check.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method check_level [line 106]

boolean check_level( int $secure)
Check the authorization level

Tags:

  • return: True if authorized, false otherwise.

Parameters:

int   $secure   Constant of level authorization to check (MEMBER_LEVEL, MODO_LEVEL, ADMIN_LEVEL).
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method check_max_value [line 141]

unknown_type check_max_value( int $key_auth, [int $max_value_compare = 0])
Get the maximum value of authorization in all user groups.

Parameters:

int   $key_auth  
int   $max_value_compare   Maximal value to compare
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_attribute [line 66]

unknown_type get_attribute( string $attribute)
Accessor

Parameters:

string   $attribute   The attribute name.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_groups [line 164]

string get_groups( )
Get all user groups

Tags:

  • return: The user groups
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_id [line 75]

int get_id( )
Get the user id

Tags:

  • return: The user id.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_user_lang [line 199]

void set_user_lang( string $user_lang)
Modify the user lang.

Parameters:

string   $user_lang   The new lang
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_user_theme [line 173]

void set_user_theme( string $user_theme)
Modify the user theme.

Parameters:

string   $user_theme   The new theme.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method update_user_lang [line 208]

void update_user_lang( $user_lang, string $user_theme)
Modify the lang for guest in the database (sessions table).

Parameters:

string   $user_theme   The new lang
   $user_lang  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method update_user_theme [line 182]

void update_user_theme( string $user_theme)
Modify the theme for guest in the database (sessions table).

Parameters:

string   $user_theme   The new theme
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method get_group_color [line 87]

static string get_group_color( string $user_groups, [int $level = 0])
Get the user group associated color.

Tags:

  • return: The group color (hexadecimal format)

Parameters:

string   $user_groups   The list of user groups separated by pipe.
int   $level   The user level. Only member have special color.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 271]   mixed  $groups_auth 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 270]   mixed  $user_data 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 272]   mixed  $user_groups 
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
Documentation generated on Tue, 28 Jul 2009 22:43:42 +0200 by phpDocumentor 1.4.1