[ Index ]

PHP Cross Reference of phpBB-3.2.0-deutsch

title

Body

[close]

/phpbb/ -> user_loader.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 236 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

user_loader:: (7 methods):
  __construct()
  load_users()
  load_user_by_username()
  get_user()
  get_username()
  get_avatar()
  get_rank()


Class: user_loader  - X-Ref

User loader class

This handles loading users from the database and
storing in them in a temporary cache so we do not
have to query the same user multiple times in
different services.
__construct(\phpbb\db\driver\driver_interface $db, $phpbb_root_path, $php_ext, $users_table)   X-Ref
User loader constructor

param: \phpbb\db\driver\driver_interface $db A database connection
param: string $phpbb_root_path Path to the phpbb includes directory.
param: string $php_ext php file extension
param: string $users_table The name of the database table (phpbb_users)

load_users(array $user_ids)   X-Ref
Load user helper

param: array $user_ids

load_user_by_username($username)   X-Ref
Load a user by username

Stores the full data in the user cache so they do not need to be loaded again
Returns the user id so you may use get_user() from the returned value

return: int User ID for the username
param: string $username Raw username to load (will be cleaned)

get_user($user_id, $query = false)   X-Ref
Get a user row from our users cache

return: array|bool Row from the database of the user or Anonymous if the user wasn't loaded/does not exist
param: int $user_id User ID of the user you want to retreive
param: bool $query Should we query the database if this user has not yet been loaded?

get_username($user_id, $mode, $guest_username = false, $custom_profile_url = false, $query = false)   X-Ref
Get username

return: string
param: int $user_id User ID of the user you want to retreive the username for
param: string $mode The mode to load (same as get_username_string). One of the following:
param: string $guest_username Optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then.
param: string $custom_profile_url Optional parameter to specify a profile url. The user id get appended to this url as &u={user_id}
param: bool $query Should we query the database if this user has not yet been loaded?

get_avatar($user_id, $query = false, $lazy = false)   X-Ref
Get avatar

return: string
param: int $user_id User ID of the user you want to retrieve the avatar for
param: bool $query Should we query the database if this user has not yet been loaded?
param: bool @lazy If true, will be lazy loaded (requires JS)

get_rank($user_id, $query = false)   X-Ref
Get rank

return: array Array with keys 'rank_title', 'rank_img', and 'rank_img_src'
param: int $user_id User ID of the user you want to retreive the rank for
param: bool $query Should we query the database if this user has not yet been loaded?



Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1