Class auth

Description

Permission/Auth class

Located in /includes/auth.php (line 23)


	
			
Direct descendents
Class Description
 class auth_admin ACP Permission/Auth class
Variable Summary
 mixed $acl
 mixed $acl_options
 mixed $cache
Method Summary
 void acl ( &$userdata)
 void acl_cache ( &$userdata)
 void acl_clear_prefetch ([ $user_id = false])
 void acl_get ( $opt, [ $f = 0])
 void acl_getf ( $opt, [bool $clean = false])
 void acl_getf_global ( $opt)
 void acl_gets ()
 void acl_get_list ([ $user_id = false], [ $opts = false], [ $forum_id = false])
 void acl_group_raw_data ([ $group_id = false], [ $opts = false], [ $forum_id = false])
 void acl_raw_data ([ $user_id = false], [ $opts = false], [ $forum_id = false])
 void acl_raw_data_single_user ( $user_id)
 void acl_role_data ( $user_type,  $role_type, [ $ug_id = false], [ $forum_id = false])
 void acl_user_raw_data ([ $user_id = false], [ $opts = false], [ $forum_id = false])
 void build_auth_option_statement ( $key,  $auth_options,  &$sql_opts)
 void build_bitstring ( &$hold_ary)
 void login ( $username,  $password, [ $autologin = false], [ $viewonline = 1], [ $admin = 0])
 void _set_group_hold_ary ( &$hold_ary,  $option_id,  $setting)
Variables
mixed $acl = array() (line 25)
mixed $acl_forum_ids = false (line 28)
mixed $acl_options = array() (line 27)
mixed $cache = array() (line 26)
Methods
acl (line 33)

Init permissions

void acl ( &$userdata)
  • &$userdata
acl_cache (line 338)

Cache data to user_permissions row

void acl_cache ( &$userdata)
  • &$userdata
acl_clear_prefetch (line 441)

Clear one or all users cached permission settings

void acl_clear_prefetch ([ $user_id = false])
  • $user_id
acl_get (line 106)

Look up an option if the option is prefixed with !, then the result becomes negated

If a forum id is specified the local option will be combined with a global option if one exist. If a forum id is not specified, only the global option will be checked.

void acl_get ( $opt, [ $f = 0])
  • $opt
  • $f
acl_getf (line 152)

Get forums with the specified permission setting if the option is prefixed with !, then the result becomes nagated

void acl_getf ( $opt, [bool $clean = false])
  • bool $clean: set to true if only values needs to be returned which are set/unset
  • $opt
acl_getf_global (line 233)

Get local permission state for any forum.

Returns true if user has the permission in one or more forums, false if in no forum. If global option is checked it returns the global state (same as acl_get($opt)) Local option has precedence...

void acl_getf_global ( $opt)
  • $opt
acl_gets (line 277)

Get permission settings (more than one)

void acl_gets ()
acl_get_list (line 306)

Get permission listing based on user_id/options/forum_ids

void acl_get_list ([ $user_id = false], [ $opts = false], [ $forum_id = false])
  • $user_id
  • $opts
  • $forum_id
acl_group_raw_data (line 685)

Get raw group based permission settings

void acl_group_raw_data ([ $group_id = false], [ $opts = false], [ $forum_id = false])
  • $group_id
  • $opts
  • $forum_id
acl_raw_data (line 521)

Get raw acl data based on user/option/forum

void acl_raw_data ([ $user_id = false], [ $opts = false], [ $forum_id = false])
  • $user_id
  • $opts
  • $forum_id
acl_raw_data_single_user (line 738)

Get raw acl data based on user for caching user_permissions This function returns the same data as acl_raw_data(), but without the user id as the first key within the array.

void acl_raw_data_single_user ( $user_id)
  • $user_id
acl_role_data (line 488)

Get assigned roles

void acl_role_data ( $user_type,  $role_type, [ $ug_id = false], [ $forum_id = false])
  • $user_type
  • $role_type
  • $ug_id
  • $forum_id
acl_user_raw_data (line 633)

Get raw user based permission settings

void acl_user_raw_data ([ $user_id = false], [ $opts = false], [ $forum_id = false])
  • $user_id
  • $opts
  • $forum_id
build_auth_option_statement (line 950)

Fill auth_option statement for later querying based on the supplied options

void build_auth_option_statement ( $key,  $auth_options,  &$sql_opts)
  • $key
  • $auth_options
  • &$sql_opts
build_bitstring (line 380)

Build bitstring from permission set

void build_bitstring ( &$hold_ary)
  • &$hold_ary
login (line 848)

Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.

void login ( $username,  $password, [ $autologin = false], [ $viewonline = 1], [ $admin = 0])
  • $username
  • $password
  • $autologin
  • $viewonline
  • $admin
_set_group_hold_ary (line 819)

Private function snippet for setting a specific piece of the hold_ary

void _set_group_hold_ary ( &$hold_ary,  $option_id,  $setting)
  • &$hold_ary
  • $option_id
  • $setting

Documentation generated on Tue, 26 Aug 2008 08:33:58 +0200 by phpDocumentor 1.4.2