[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

/wp-admin/includes/ -> user.php (summary)

WordPress user administration API.

File Size: 383 lines (14 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 10 functions

  add_user()
  edit_user()
  get_editable_roles()
  get_user_to_edit()
  get_users_drafts()
  wp_delete_user()
  wp_revoke_user()
  default_password_nag_handler()
  default_password_nag_edit_user()
  default_password_nag()

Functions
Functions that are not part of a class:

add_user()   X-Ref
Creates a new user from the "Users" form using $_POST information.

It seems that the first half is for backwards compatibility, but only
has the ability to alter the user's role. WordPress core seems to
use this function only in the second way, running edit_user() with
no id so as to create a new user.

param: int $user_id Optional. User ID.
return: null|WP_Error|int Null when adding user, WP_Error or User ID integer when no parameters.

edit_user( $user_id = 0 )   X-Ref
Edit user settings based on contents of $_POST

Used on user-edit.php and profile.php to manage and process user options, passwords etc.

param: int $user_id Optional. User ID.
return: int user id of the updated user

get_editable_roles()   X-Ref
Fetch a filtered list of user roles that the current user is
allowed to edit.

Simple function who's main purpose is to allow filtering of the
list of roles in the $wp_roles object so that plugins can remove
innappropriate ones depending on the situation or user making edits.
Specifically because without filtering anyone with the edit_users
capability can edit others to be administrators, even if they are
only editors or authors. This filter allows admins to delegate
user management.

return: unknown

get_user_to_edit( $user_id )   X-Ref
Retrieve user data and filter it.

param: int $user_id User ID.
return: object WP_User object with user data.

get_users_drafts( $user_id )   X-Ref
Retrieve the user's drafts.

param: int $user_id User ID.
return: array

wp_delete_user( $id, $reassign = 'novalue' )   X-Ref
Remove user and optionally reassign posts and links to another user.

If the $reassign parameter is not assigned to an User ID, then all posts will
be deleted of that user. The action 'delete_user' that is passed the User ID
being deleted will be run after the posts are either reassigned or deleted.
The user meta will also be deleted that are for that User ID.

param: int $id User ID.
param: int $reassign Optional. Reassign posts and links to new User ID.
return: bool True when finished.

wp_revoke_user($id)   X-Ref
Remove all capabilities from user.

param: int $id User ID.

default_password_nag_handler($errors = false)   X-Ref


default_password_nag_edit_user($user_ID, $old_data)   X-Ref


default_password_nag()   X-Ref




Generated: Wed Jun 1 08:30:02 2011 Cross-referenced by PHPXref 0.7
Provided by Yoast and awesome WordPress Hosting