Class user

Description

Base user class

This is the overarching class which contains (through session extend) all methods utilised for user functionality during a session.

Located in /includes/session.php (line 1376)

session
   |
   --user
Variable Summary
 mixed $date_format
 mixed $dst
 mixed $help
 mixed $img_array
 mixed $img_lang
 mixed $keyoptions
 mixed $keyvalues
 mixed $lang
 mixed $lang_id
 mixed $lang_name
 mixed $lang_path
 mixed $theme
 mixed $timezone
Method Summary
 user user ()
 void add_lang (mixed $lang_set, [bool $use_db = false], [bool $use_help = false])
 void format_date ( $gmepoch, [ $format = false], [ $forcedate = false])
 void get_iso_lang_id ()
 void get_profile_fields ( $user_id)
 void img ( $img, [ $alt = ''], [ $width = false], [ $suffix = ''], [ $type = 'full_tag'])
 void optionget ( $key, [ $data = false])
 void optionset ( $key,  $value, [ $data = false])
 void setup ([ $lang_set = false], [ $style = false])
 void set_custom_lang_path (string $lang_path)
 void set_lang ( &$lang,  &$help,  $lang_file, [ $use_db = false], [ $use_help = false])
Variables
mixed $date_format (line 1381)
mixed $dst (line 1383)
mixed $help = array() (line 1379)
mixed $img_array = array() (line 1389)
mixed $img_lang (line 1388)
mixed $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10) (line 1392)
mixed $keyvalues = array() (line 1393)
mixed $lang = array() (line 1378)
mixed $lang_id = false (line 1386)
mixed $lang_name = false (line 1385)
mixed $lang_path (line 1387)
mixed $theme = array() (line 1380)
mixed $timezone (line 1382)

Inherited Variables

Inherited from session

session::$browser
session::$cookie_data
session::$data
session::$forwarded_for
session::$host
session::$ip
session::$load
session::$page
session::$session_id
session::$time_now
session::$update_session_page
Methods
Constructor user (line 1398)

Constructor to set the lang path

user user ()
add_lang (line 1810)

Add Language Items - use_db and use_help are assigned where needed (only use them to force inclusion)

void add_lang (mixed $lang_set, [bool $use_db = false], [bool $use_help = false])
  • mixed $lang_set: specifies the language entries to include
  • bool $use_db: internal variable for recursion, do not use
  • bool $use_help:

    internal variable for recursion, do not use

    Examples:

    1.  $lang_set array('posting''help' => 'faq');
    2.  $lang_set array('posting''viewtopic''help' => array('bbcode''faq'))
    3.  $lang_set array(array('posting''viewtopic')'help' => array('bbcode''faq'))
    4.  $lang_set 'posting'
    5.  $lang_set array('help' => 'faq''db' => array('help:faq''posting'))

format_date (line 1892)

Format user date

void format_date ( $gmepoch, [ $format = false], [ $forcedate = false])
  • $gmepoch
  • $format
  • $forcedate
get_iso_lang_id (line 1940)

Get language id currently used by the user

void get_iso_lang_id ()
get_profile_fields (line 1967)

Get users profile fields

void get_profile_fields ( $user_id)
  • $user_id
img (line 1987)

Specify/Get image

void img ( $img, [ $alt = ''], [ $width = false], [ $suffix = ''], [ $type = 'full_tag'])
  • $img
  • $alt
  • $width
  • $suffix
  • $type
optionget (line 2035)

Get option bit field from user options

void optionget ( $key, [ $data = false])
  • $key
  • $data
optionset (line 2049)

Set option bit field for user options

void optionset ( $key,  $value, [ $data = false])
  • $key
  • $value
  • $data
setup (line 1424)

Setup basic user-specific items (style, language, ...)

void setup ([ $lang_set = false], [ $style = false])
  • $lang_set
  • $style
set_custom_lang_path (line 1411)

Function to set custom language path (able to use directory outside of phpBB)

  • access: public
void set_custom_lang_path (string $lang_path)
  • string $lang_path: New language path used.
set_lang (line 1851)

Set language entry (called by add_lang)

  • access: private
void set_lang ( &$lang,  &$help,  $lang_file, [ $use_db = false], [ $use_help = false])
  • &$lang
  • &$help
  • $lang_file
  • $use_db
  • $use_help

Inherited Methods

Inherited From session

 session::check_ban()
 session::check_dnsbl()
 session::confirm_gc()
 session::extract_current_page()
 session::reset_login_keys()
 session::session_begin()
 session::session_create()
 session::session_gc()
 session::session_kill()
 session::set_cookie()
 session::set_login_key()
 session::unset_admin()
 session::validate_referer()

Documentation generated on Tue, 26 Aug 2008 08:34:09 +0200 by phpDocumentor 1.4.2