[ Index ]

PHP Cross Reference of MyBB

title

Body

[close]

/inc/ -> functions_user.php (summary)

MyBB 1.6 Copyright 2010 MyBB Group, All Rights Reserved Website: http://mybb.com License: http://mybb.com/about/license

File Size: 634 lines (16 kb)
Included or required: 23 times
Referenced: 0 times
Includes or requires: 0 files

Defines 21 functions

  user_exists()
  username_exists()
  validate_password_from_username()
  validate_password_from_uid()
  update_password()
  salt_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()

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 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 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 The username of the user.
param: string 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 The user id.
param: string The plain-text password.
param: string 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 The user's id.
param: string The md5()'ed password.
param: string (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 The md5()'ed password.
param: string The salt.
return: string The password hash.

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 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 The uid of the user to update.
return: string The new login key.

add_subscribed_thread($tid, $notification=1, $uid="")   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 The tid of the thread to add to the list.
param: int (Optional) The type of notification to receive for replies (0=none, 1=instant)
param: int (Optional) The uid of the user who's list to update.
return: boolean True when success, false when otherwise.

remove_subscribed_thread($tid, $uid="")   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 The tid of the thread to remove from the list.
param: int (Optional) The uid of the user who's list to update.
return: boolean True when success, false when otherwise.

add_subscribed_forum($fid, $uid="")   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 The fid of the forum to add to the list.
param: int (Optional) The uid of the user who's list to update.
return: boolean True when success, false when otherwise.

remove_subscribed_forum($fid, $uid="")   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 The fid of the forum to remove from the list.
param: int (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="")   X-Ref
Gets the usertitle for a specific uid.

param: int 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 The user id to update the count for. If none, assumes currently logged in user.
param: int Bitwise value for what to update. 1 = total, 2 = new, 4 = unread. Combinations accepted.
param: int The unix timestamp the user with uid last visited. If not specified, will be queried.

get_pm_folder_name($fid, $name="")   X-Ref
Return the language specific name for a PM folder.

param: int The ID of the folder.
param: string The folder name - can be blank, will use language default.
return: string The name of the folder.



Generated: Tue Oct 8 19:19:50 2013 Cross-referenced by PHPXref 0.7.1