[ Index ]

PHP Cross Reference of MyBB 1.8.27

title

Body

[close]

/inc/ -> functions_user.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 821 lines (19 kb)
Included or required: 25 times
Referenced: 0 times
Includes or requires: 0 files

Defines 25 functions

  user_exists()
  username_exists()
  validate_password_from_username()
  validate_password_from_uid()
  update_password()
  salt_password()
  create_password()
  verify_user_password()
  generate_salt()
  generate_loginkey()
  update_salt()
  update_loginkey()
  add_subscribed_thread()
  remove_subscribed_thread()
  add_subscribed_forum()
  remove_subscribed_forum()
  usercp_menu()
  usercp_menu_messenger()
  usercp_menu_profile()
  usercp_menu_misc()
  get_usertitle()
  update_pm_count()
  get_pm_folder_name()
  generate_question()
  purgespammer_show()

Functions
Functions that are not part of a class:

user_exists($uid)   X-Ref
Checks if a user with uid $uid exists in the database.
param: int $uid The uid to check for.
return: boolean True when exists, false when not.

username_exists($username)   X-Ref
Checks if $username already exists in the database.
param: string $username The username for check for.
return: boolean True when exists, false when not.

validate_password_from_username($username, $password)   X-Ref
Checks a password with a supplied username.
param: string $username The username of the user.
param: string $password The plain-text password.
return: boolean|array False when no match, array with user info when match.

validate_password_from_uid($uid, $password, $user = array()   X-Ref
Checks a password with a supplied uid.
param: int $uid The user id.
param: string $password The plain-text password.
param: array $user An optional user data array.
return: boolean|array False when not valid, user data array when valid.

update_password($uid, $password, $salt="")   X-Ref
Updates a user's password.
param: int $uid The user's id.
param: string $password The md5()'ed password.
param: string $salt (Optional) The salt of the user.
return: array The new password.

salt_password($password, $salt)   X-Ref
Salts a password based on a supplied salt.
param: string $password The md5()'ed password.
param: string $salt The salt.
return: string The password hash.

create_password($password, $salt = false, $user = false)   X-Ref
Salts a password based on a supplied salt.
param: string $password The input password.
param: string $salt (Optional) The salt used by the MyBB algorithm.
param: string $user (Optional) An array containing password-related data.
return: array Password-related fields.

verify_user_password($user, $password)   X-Ref
Compares user's password data against provided input.
param: array $user An array containing password-related data.
param: string $password The plain-text input password.
return: bool Result of the comparison.

generate_salt()   X-Ref
Generates a random salt
return: string The salt.

generate_loginkey()   X-Ref
Generates a 50 character random login key.
return: string The login key.

update_salt($uid)   X-Ref
Updates a user's salt in the database (does not update a password).
param: int $uid The uid of the user to update.
return: string The new salt.

update_loginkey($uid)   X-Ref
Generates a new login key for a user.
param: int $uid The uid of the user to update.
return: string The new login key.

add_subscribed_thread($tid, $notification=1, $uid=0)   X-Ref
Adds a thread to a user's thread subscription list.
If no uid is supplied, the currently logged in user's id will be used.

param: int $tid The tid of the thread to add to the list.
param: int $notification (Optional) The type of notification to receive for replies (0=none, 1=email, 2=pm)
param: int $uid (Optional) The uid of the user who's list to update.
return: boolean True when success, false when otherwise.

remove_subscribed_thread($tid, $uid=0)   X-Ref
Remove a thread from a user's thread subscription list.
If no uid is supplied, the currently logged in user's id will be used.

param: int $tid The tid of the thread to remove from the list.
param: int $uid (Optional) The uid of the user who's list to update.
return: boolean True when success, false when otherwise.

add_subscribed_forum($fid, $uid=0)   X-Ref
Adds a forum to a user's forum subscription list.
If no uid is supplied, the currently logged in user's id will be used.

param: int $fid The fid of the forum to add to the list.
param: int $uid (Optional) The uid of the user who's list to update.
return: boolean True when success, false when otherwise.

remove_subscribed_forum($fid, $uid=0)   X-Ref
Removes a forum from a user's forum subscription list.
If no uid is supplied, the currently logged in user's id will be used.

param: int $fid The fid of the forum to remove from the list.
param: int $uid (Optional) The uid of the user who's list to update.
return: boolean True when success, false when otherwise.

usercp_menu()   X-Ref
Constructs the usercp navigation menu.

usercp_menu_messenger()   X-Ref
Constructs the usercp messenger menu.

usercp_menu_profile()   X-Ref
Constructs the usercp profile menu.

usercp_menu_misc()   X-Ref
Constructs the usercp misc menu.

get_usertitle($uid=0)   X-Ref
Gets the usertitle for a specific uid.
param: int $uid The uid of the user to get the usertitle of.
return: string The usertitle of the user.

update_pm_count($uid=0, $count_to_update=7)   X-Ref
Updates a users private message count in the users table with the number of pms they have.
param: int $uid The user id to update the count for. If none, assumes currently logged in user.
param: int $count_to_update Bitwise value for what to update. 1 = total, 2 = new, 4 = unread. Combinations accepted.
return: array The updated counters

get_pm_folder_name($fid, $name="")   X-Ref
Return the language specific name for a PM folder.
param: int $fid The ID of the folder.
param: string $name The folder name - can be blank, will use language default.
return: string The name of the folder.

generate_question($old_qid=0)   X-Ref
Generates a security question for registration.
param: int $old_qid Optional ID of the old question.
return: string The question session id.

purgespammer_show($post_count, $usergroup, $uid)   X-Ref
Check whether we can show the Purge Spammer Feature
param: int $post_count The users post count
param: int $usergroup The usergroup of our user
param: int $uid The uid of our user
return: boolean Whether or not to show the feature



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref