[ Index ]

PHP Cross Reference of phpBB-3.2.0-deutsch

title

Body

[close]

/includes/ -> functions_user.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: 3702 lines (99 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 43 functions

  user_get_id_name()
  update_last_username()
  user_update_name()
  user_add()
  user_delete()
  user_active_flip()
  user_ban()
  user_unban()
  user_ipwhois()
  validate_data()
  validate_string()
  validate_num()
  validate_date()
  validate_match()
  validate_language_iso_name()
  phpbb_validate_timezone()
  validate_username()
  validate_password()
  phpbb_validate_email()
  validate_user_email()
  validate_jabber()
  phpbb_validate_hex_colour()
  phpbb_style_is_active()
  avatar_delete()
  get_avatar_filename()
  phpbb_avatar_explanation_string()
  group_create()
  group_correct_avatar()
  avatar_remove_db()
  group_delete()
  group_user_add()
  group_user_del()
  remove_default_avatar()
  remove_default_rank()
  group_user_attributes()
  group_validate_groupname()
  group_set_user_default()
  get_group_name()
  group_memberships()
  group_update_listings()
  remove_newly_registered()
  phpbb_get_banned_user_ids()
  phpbb_module_zebra()

Functions
Functions that are not part of a class:

user_get_id_name(&$user_id_ary, &$username_ary, $user_type = false)   X-Ref
Obtain user_ids from usernames or vice versa. Returns false on
success else the error string

param: array &$user_id_ary The user ids to check or empty if usernames used
param: array &$username_ary The usernames to check or empty if user ids used
param: mixed $user_type Array of user types to check, false if not restricting by user type

update_last_username()   X-Ref
Get latest registered username and update database to reflect it


user_update_name($old_name, $new_name)   X-Ref
Updates a username across all relevant tables/fields

param: string $old_name the old/current username
param: string $new_name the new username

user_add($user_row, $cp_data = false, $notifications_data = null)   X-Ref
Adds an user

return: the new user's ID.
param: mixed $user_row An array containing the following keys (and the appropriate values): username, group_id (the group to place the user in), user_email and the user_type(usually 0). Additional entries not overridden by defaults will be forwarded.
param: string $cp_data custom profile fields, see custom_profile::build_insert_sql_array
param: array $notifications_data The notifications settings for the new user

user_delete($mode, $user_ids, $retain_username = true)   X-Ref
Remove User

return: bool
param: string    $mode        Either 'retain' or 'remove'
param: mixed        $user_ids    Either an array of integers or an integer
param: bool        $retain_username

user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)   X-Ref
Flips user_type from active to inactive and vice versa, handles group membership updates

param: string $mode can be flip for flipping from active/inactive, activate or deactivate

user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')   X-Ref
Add a ban or ban exclusion to the banlist. Bans either a user, an IP or an email address

return: boolean
param: string $mode Type of ban. One of the following: user, ip, email
param: mixed $ban Banned entity. Either string or array with usernames, ips or email addresses
param: int $ban_len Ban length in minutes
param: string $ban_len_other Ban length as a date (YYYY-MM-DD)
param: boolean $ban_exclude Exclude these entities from banning?
param: string $ban_reason String describing the reason for this ban

user_unban($mode, $ban)   X-Ref
Unban User


user_ipwhois($ip)   X-Ref
Internet Protocol Address Whois
RFC3912: WHOIS Protocol Specification

return: string        Empty string if not a valid ip address.
param: string $ip        Ip address, either IPv4 or IPv6.

validate_data($data, $val_ary)   X-Ref
Data validation ... used primarily but not exclusively by ucp modules

"Master" function for validating a range of data types

validate_string($string, $optional = false, $min = 0, $max = 0)   X-Ref
Validate String

return: boolean|string    Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)

validate_num($num, $optional = false, $min = 0, $max = 1E99)   X-Ref
Validate Number

return: boolean|string    Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)

validate_date($date_string, $optional = false)   X-Ref
Validate Date

return: boolean
param: String $string a date in the dd-mm-yyyy format

validate_match($string, $optional = false, $match = '')   X-Ref
Validate Match

return: boolean|string    Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)

validate_language_iso_name($lang_iso)   X-Ref
Validate Language Pack ISO Name

Tests whether a language name is valid and installed

return: bool|string        Either false if validation succeeded or
param: string $lang_iso    The language string to test

phpbb_validate_timezone($timezone)   X-Ref
Validate Timezone Name

Tests whether a timezone name is valid

return: bool|string        Either false if validation succeeded or
param: string $timezone    The timezone string to test

validate_username($username, $allowed_username = false)   X-Ref
Check to see if the username has been taken, or if it is disallowed.
Also checks if it includes the " character, which we don't allow in usernames.
Used for registering, changing names, and posting anonymously with a username

return: mixed    Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
param: string $username The username to check
param: string $allowed_username An allowed username, default being $user->data['username']

validate_password($password)   X-Ref
Check to see if the password meets the complexity settings

return: boolean|string    Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)

phpbb_validate_email($email, $config = null)   X-Ref
Check to see if email address is a valid address and contains a MX record

return: mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
param: string $email The email to check

validate_user_email($email, $allowed_email = false)   X-Ref
Check to see if email address is banned or already present in the DB

return: mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
param: string $email The email to check
param: string $allowed_email An allowed email, default being $user->data['user_email']

validate_jabber($jid)   X-Ref
Validate jabber address
Taken from the jabber class within flyspray (see author notes)

author: flyspray.org

phpbb_validate_hex_colour($colour, $optional = false)   X-Ref
Validate hex colour value

return: bool|string Error message if colour value is incorrect, false if it
param: string $colour The hex colour value
param: bool $optional Whether the colour value is optional. True if an empty

phpbb_style_is_active($style_id)   X-Ref
Verifies whether a style ID corresponds to an active style.

return: boolean
param: int $style_id The style_id of a style which should be checked if activated or not.

avatar_delete($mode, $row, $clean_db = false)   X-Ref
Remove avatar


get_avatar_filename($avatar_entry)   X-Ref
Generates avatar filename from the database entry


phpbb_avatar_explanation_string()   X-Ref
Returns an explanation string with maximum avatar settings

return: string

group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow_desc_bbcode = false, $allow_desc_urls = false, $allow_desc_smilies = false)   X-Ref
Add or edit a group. If we're editing a group we only update user
parameters such as rank, etc. if they are changed


group_correct_avatar($group_id, $old_entry)   X-Ref
Changes a group avatar's filename to conform to the naming scheme


avatar_remove_db($avatar_name)   X-Ref
Remove avatar also for users not having the group as default


group_delete($group_id, $group_name = false)   X-Ref
Group Delete


group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)   X-Ref
Add user(s) to group

return: mixed false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'

group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $log_action = true)   X-Ref
Remove a user/s from a given group. When we remove users we update their
default group_id. We do this by examining which "special" groups they belong
to. The selection is made based on a reasonable priority system

return: false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'

remove_default_avatar($group_id, $user_ids)   X-Ref
Removes the group avatar of the default group from the users in user_ids who have that group as default.


remove_default_rank($group_id, $user_ids)   X-Ref
Removes the group rank of the default group from the users in user_ids who have that group as default.


group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)   X-Ref
This is used to promote (to leader), demote or set as default a member/s


group_validate_groupname($group_id, $group_name)   X-Ref
A small version of validate_username to check for a group name's existence. To be called directly.


group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false)   X-Ref
Set users default group


get_group_name($group_id)   X-Ref
Get group name


group_memberships($group_id_ary = false, $user_id_ary = false, $return_bool = false)   X-Ref
Obtain either the members of a specified group, the groups the specified user is subscribed to
or checking if a specified user is in a specified group. This function does not return pending memberships.

Note: Never use this more than once... first group your users/groups

group_update_listings($group_id)   X-Ref
Re-cache moderators and foes if group has a_ or m_ permissions


remove_newly_registered($user_id, $user_data = false)   X-Ref
Funtion to make a user leave the NEWLY_REGISTERED system group.

param: $user_id The id of the user to remove from the group

phpbb_get_banned_user_ids($user_ids = array()   X-Ref
Gets user ids of currently banned registered users.

return: array    Array of banned users' ids if any, empty array otherwise
param: array $user_ids Array of users' ids to check for banning,
param: bool|int $ban_end Bool True to get users currently banned

phpbb_module_zebra($mode, &$module_row)   X-Ref
Function for assigning a template var if the zebra module got included




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