Метод | Описание | |
---|---|---|
admin_print_styles_users_php ( ) | Fires when styles are printed for a specific admin page based on $hook_suffix. | |
authenticate ( string $email, string $password ) : integer | boolean | Try to authenticate an user without log-in in the system. This method is very different by signIn(). | |
avatar ( integer $id_user = null, integer $size = 40 ) : WPDKHTMLTagImg | boolean | Return an instance of WPDKHTMLTagImg class | |
create ( string $first_name, string $last_name, string $email, boolean | string $password = false, boolean $enabled = false, string $role = 'subscriber' ) : integer | WP_Error | Create a WordPress user and return the user id on success, WP_Error otherwise. | |
createWithArgs ( array $args ) : integer | WP_Error | Create a WordPress user and return the user id on success, WP_Error otherwise. | |
deleteUsersMetaWithKey ( string $key ) | Delete the user meta with $key from all users. | |
delete_user ( integer $id_user ) | The delete_user action/hook can be used to perform additional actions when a user is deleted. | |
deleted_user ( integer $id_user ) | The deleted_user action/hook can be used to perform additional actions after a user is deleted. | |
edit_user_profile ( WP_User $profileuser ) | Fires after the 'About the User' settings table on the 'Edit User' screen. | |
edit_user_profile_update ( integer $user_id ) | Fires before the page loads on the 'Edit User' screen. | |
gravatar ( integer $id_user = null, integer $size = 40, string $alt = '', string $default = 'wavatar' ) : string | boolean | Return the HTML markup of tag img with the user gravatar. FALSE otherwise. | |
init ( ) : WPDKUsers | Return a singleton instance of WPDKUsers class | |
logout ( ) | Force an user logout when disabled or if in GET you pass wpdk_logout. | |
personal_options ( WP_User $profileuser ) | Fires at the end of the 'Personal Options' settings table on the user editing screen. | |
personal_options_update ( integer $user_id ) | Fires before the page loads on the 'Your Profile' editing screen. | |
profile_personal_options ( WP_User $profileuser ) | Fires after the 'Personal Options' settings table on the 'Your Profile' editing screen. | |
show_user_profile ( WP_User $profileuser ) | Fires after the 'About Yourself' settings table on the 'Your Profile' editing screen. | |
signIn ( string | integer $user, string $password, boolean $remember = false ) : boolean | Do a WordPress Sign in and call filters and action. Return TRUE if success, FALSE for access denied. | |
signout ( ) | Perform signout. This method is an alias of wp_logout() | |
userWithMetaAndValue ( string $meta_key, string $meta_value ) : integer | Return the User id with meta key and meta value. | |
user_contactmethods ( $contacts ) | Filter the user contact methods. | |
usersWithCaps ( string $find_caps ) : array | Return the users list with a capability | |
wp_authenticate_user ( WP_User | WP_Error $user ) | Filter whether the given user can be authenticated with the provided $password. | |
wp_login ( string $user_login, WP_User $user = null ) | Fires after the user has successfully logged in. | |
wp_login_failed ( string $username ) | Fires after a user login has failed. | |
wp_logout ( ) | Fires after a user is logged-out. |
Метод | Описание | |
---|---|---|
__construct ( ) : WPDKUsers | Return an instance of WPDKUsers class and register the primary hook for manage and enhancer the standard WordPress User. |
public admin_print_styles_users_php ( ) |
public create ( string $first_name, string $last_name, string $email, boolean | string $password = false, boolean $enabled = false, string $role = 'subscriber' ) : integer | WP_Error | ||
$first_name | string | First name |
$last_name | string | Last name |
string | Email address | |
$password | boolean | string | Optional. Clear password, if set to FALSE a random password is created |
$enabled | boolean | Optional. If FALSE the WPDK user status is set to disable. Default FALSE. |
$role | string | Optional. User role, default 'subscriber' |
Результат | integer | WP_Error |
public createWithArgs ( array $args ) : integer | WP_Error | ||
$args | array | { An array user data arguments. @type int $ID User ID. If supplied, the user will be updated. @type string $user_pass The plain-text user password. @type string $user_login The user's login username. @type string $user_nicename The URL-friendly user name. @type string $user_url The user URL. @type string $user_email The user email address. @type string $display_name The user's display name. Default is the the user's username. @type string $nickname The user's nickname. Default Default is the the user's username. @type string $first_name The user's first name. For new users, will be used to build $display_name if unspecified. @type stirng $last_name The user's last name. For new users, will be used to build $display_name if unspecified. @type string|bool $rich_editing Whether to enable the rich-editor for the user. False if not empty. @type string $date_registered Date the user registered. Format is 'Y-m-d H:i:s'. @type string $role User's role. @type string $jabber User's Jabber account username. @type string $aim User's AIM account username. @type string $yim User's Yahoo! messenger username. @type bool $enabled Set TRUE to enable user. Default FALSE. } |
Результат | integer | WP_Error |
public static deleteUsersMetaWithKey ( string $key ) | ||
$key | string | Meta key to delete. |
public delete_user ( integer $id_user ) | ||
$id_user | integer | User ID |
public deleted_user ( integer $id_user ) | ||
$id_user | integer | User ID |
public edit_user_profile ( WP_User $profileuser ) | ||
$profileuser | WP_User | The current WP_User object. |
public edit_user_profile_update ( integer $user_id ) | ||
$user_id | integer | The user ID. |
public gravatar ( integer $id_user = null, integer $size = 40, string $alt = '', string $default = 'wavatar' ) : string | boolean | ||
$id_user | integer | Optional. User ID or null for current user |
$size | integer | Optional. Gravatar size. Default `40` |
$alt | string | Optional. Alternate string for alt attribute. Default user display name. |
$default | string | Optional. Gravatar ID for default (not found) gravatar image, Default `wavatar` |
Результат | string | boolean |
public static init ( ) : WPDKUsers | ||
Результат | WPDKUsers |
public logout ( ) |
public personal_options ( WP_User $profileuser ) | ||
$profileuser | WP_User | The current WP_User object. |
public personal_options_update ( integer $user_id ) | ||
$user_id | integer | The user ID. |
public profile_personal_options ( WP_User $profileuser ) | ||
$profileuser | WP_User | The current WP_User object. |
public show_user_profile ( WP_User $profileuser ) | ||
$profileuser | WP_User | The current WP_User object. |
public signout ( ) |
public user_contactmethods ( $contacts ) |
public static usersWithCaps ( string $find_caps ) : array | ||
$find_caps | string | Single capability |
Результат | array |
public wp_authenticate_user ( WP_User | WP_Error $user ) | ||
$user | WP_User | WP_Error | WP_User or WP_Error object if a previous callback failed authentication. |
public wp_login_failed ( string $username ) | ||
$username | string | User login. |