Tag Info

Hot answers tagged

5

The user passwords are stored in one-way encription. Even looking at the database you can not know the password. The is a very basic privacy feature. Most users use the same password on multiple sites; imaging the potential risks for users if the administrator of the site can access to their passwords. You can intercept the password from the ...


2

I am not sure exactly what you are asking for, but, if you want to target a specific user ID, just do something like: // set special user id $special_user_id = 5; $current_user_id = get_current_user_id(); if ( $special_user_id == $current_user_id ){ echo 'special user is online'; } You get the idea.


1

Use wp-admin/admin.php with an action parameter: <a href="<?php echo esc_url( admin_url( "admin.php?action=wpse_184153_create_page&user_id=$user_id" ) ) ?>">Create Page</a> And then hook onto the event: function wpse_184153_create_page() { $redirect = admin_url( 'users.php' ); if ( ! empty( $_GET['user_id'] ) && ...


1

Generally speaking I agree with most of the other answers but, if for some reason you really had to merge two accounts here is how that could work. Merging User-B into User-A Reassign all of User-B's content to User-A Determine the highest privilege of User-B If higher than the privileges of User-A elevate User-A's privileges else do nothing. If you have ...


1

You are using pre_user_query according to WordPress documentation Fires after the WP_User_Query has been parsed, and before the query is executed Then you should use pre_get_users just like pre_get_posts when your arguments have some meaning to WordPress. pre_get_users Fires before the WP_User_Query has been parsed Replace your hook with ...


1

You could take a look at the contributors function included in Twenty Fourteen if ( ! function_exists( 'twentyfourteen_list_authors' ) ) : /** * Print a list of all site contributors who published at least one post. * * @since Twenty Fourteen 1.0 */ function twentyfourteen_list_authors() { $contributor_ids = get_users( array( 'fields' => ...


1

You can use wp_create_user and pass necessary information like $username, $password, $email , where $email is optional. If user created successfully it will return ID of newly created user, other wise will return error object. Then update user's other information using update_user_meta.


1

This is not possible, since the output of your gtp_users_table_content function for the manage_users_custom_column action hook is printed within predefined <td></td> elements. However, you can put a simple div with a class around your output: // Add users table lead purchase column content add_action( 'manage_users_custom_column', ...



Only top voted, non community-wiki answers of a minimum length are eligible