How to migrate wordpress users from one blog to another

Normally BackupBuddy should transfer users just fine, it might be issue with importing into multisite installation. Have you tried asking developers about it? As for more hands-on approach I’d try creating users in network and then overwrite hashes of their passwords in database with values from original installation.

How to change the order in which users are displayed in admin?

Nope, the line you found seems to be some basic preliminary query. Selection of users for display in table seems to be handled by WP_User_Search class. Luckily it can be hooked into easily. Try this (changes order to descending): add_action(‘pre_user_search’, ‘change_user_order’); function change_user_order($query) { $query->query_orderby = ‘ ORDER BY user_login DESC’; } PS I am … Read more

How can I let users to access plugin functions based on roles?

You can check if current user is an Author (WP-Codex) $current_user_is_allowed_to_edit = false; if ( current_user_can(‘delete_posts’) ) { $current_user_is_allowed_to_edit = true; } And use it in the if-statement at the point where you implement the Live Edit function. Here is the whole code (for user roles): http://pastebin.com/fY7UPcB1 EDIT: Here is the new code (check for … Read more

Paginate a list of users?

As BandonRandon mentioned in the comments you can use the offset and number to query 10 users at a time. Here’s a simplified version of what I do in my Simple User Listing plugin which lists users with built-in pagination and the ability for customizing the list output in your theme, so it might save … Read more

Get total number of authors on the site

You can use the WP_User_Query class, like the example below. Each code line have an small description, that you understand, what we do. // Get all users with role Author. $user_query = new WP_User_Query( array( ‘role’ => ‘Author’ ) ); // Get the total number of users for the current query. I use (int) only … Read more

Limit content by user registration date

I have just made this code you can try out: add_filter( ‘the_content’, ‘restrict_access’ ); function restrict_access( $content ) { $user_info = wp_get_current_user(); // Get logged in user info $registered = $user_info->user_registered; if( !is_user_logged_in() ) { $content = __( “You are not logged in.”, ‘your_textdomain’ ); } else if (new DateTime( get_the_date() ) < new DateTime( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)