phpBB

Development Wiki

User class

From phpBB Development Wiki

This article is a stub. You can help in improving Olympus Documentation by expanding it.

The User Class

User Class Properties

Property Array Key Description
[$user->lang] Language Keys You can access language values from this property
[$user->page]
  • 'page_name'
  • 'page_dir'
  • 'query_string'
  • 'script_path'
  • 'root_script_path'
  • 'page'
Used to display information about the page in which the user is on.
[$user->data]
  • 'user_id'
  • 'user_type'
  • 'group_id' // Group id the user is a default member of
  • 'user_ip' // IP user registered with NOT CURRENT BROWSING IP
  • 'user_regdate' // User's registration date
  • 'username'
  • 'username_clean' // Username in lowercase letters
  • 'user_email'
  • 'user_email_hash'
  • 'user_birthday'
  • 'user_lastvisit'
  • 'user_lastmark'
  • 'user_lastpost_time'
  • 'user_lastpage'
  • 'user_last_confirm_key'
  • 'user_last_search'
  • 'user_warnings'
  • 'user_last_warning'
  • 'user_login_attempts'
  • 'user_inactive_reason'
  • 'user_inactive_time'
  • 'user_posts'
  • 'user_lang'
  • 'user_timezone'
  • 'user_dateformat'
  • 'user_style'
  • 'user_rank'
  • 'user_colour'
  • 'user_message_rules'
  • 'user_full_folder'
  • 'user_emailtime'
  • 'user_topic_show_days'
  • 'user_topic_sortby_type'
  • 'user_topic_sortby_dir'
  • 'user_post_show_days'
  • 'user_post_sortby_type'
  • 'user_post_sortby_dir'
  • 'user_notify'
  • 'user_notify_pm'
  • 'user_notify_type'
  • 'user_allow_pm'
  • 'user_allow_viewonline'
  • 'user_allow_viewemail'
  • 'user_allow_massemail'
  • 'user_options'
  • 'user_avatar'
  • 'user_avatar_type'
  • 'user_avatar_width'
  • 'user_avatar_height'
  • 'user_sig'
  • 'user_sig_bbcode_uid' // For the signature
  • 'user_sig_bbcode_bitfield' // For the signature
  • 'user_from'
  • 'user_icq'
  • 'user_aim'
  • 'user_yim'
  • 'user_msnm'
  • 'user_jabber'
  • 'user_website'
  • 'user_occ'
  • 'user_interests'
  • 'user_actkey'
  • 'user_newpasswd'
  • 'is_registered'
  • 'is_bot'
  • 'session_admin'
The user's actual forum data
[$user->browser] not an array User Agent
[$user->host] not an array
[$user->ip] not an array IP address user is currently browsing under
[$user->theme]
  • 'bbcode_bitfield'
  • 'imageset_id'
  • 'imageset_name'
  • 'imageset_path'
  • 'style_id'
  • 'template_id'
  • 'template_path'
  • 'template_storedb'
  • 'theme_id'
  • 'theme_name'
  • 'theme_path'
  • 'theme_storedb'
[$user->time_now] not an array
[$user->update_session_page] not an array

User Class Methods

Method Input Output What It Does
format_date
  • timestamp (since unix epoch)
  • override format
  • force date
A formated php:date string given by the user's preferences. If the second option is given, uses that format instead (?) unknown