[ Index ]

PHP Cross Reference of MyBB 1.8.38

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: 815 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.
return: boolean True when exists, false when not.
param: int $uid The uid to check for.

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

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

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

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

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

create_password($password, $salt = false, $user = false)   X-Ref
Salts a password based on a supplied salt.
return: array Password-related fields.
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.

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

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).
return: string The new salt.
param: int $uid The uid of the user to update.

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

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.

return: boolean True when success, false when otherwise.
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.

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.

return: boolean True when success, false when otherwise.
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.

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.

return: boolean True when success, false when otherwise.
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.

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.

return: boolean True when success, false when otherwise.
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.

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.
return: string The usertitle of the user.
param: int $uid The uid of the user to get the usertitle of.

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.
return: array The updated counters
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.

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

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

purgespammer_show($post_count, $usergroup, $uid)   X-Ref
Check whether we can show the Purge Spammer Feature
return: boolean Whether or not to show the 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



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