include user profiles in search results?

I haven’t an ready to use solution. However I think you should enhance the query, so that you have the field of the users inside this. I think the follow example demonstrate it more. The two filter hooks are necessary and get an result for the query like this: SELECT SQL_CALC_FOUND_ROWS wpbeta_posts.ID FROM wpbeta_posts JOIN … Read more

Post-Registration, post-meta hook?

You can use user_register add_action(‘user_register’, ‘wpse42506_user_register’, 10, 3); function wpse42506_user_register( $user_ID ) { // do stuff here } If you want to just use the user information, you can use get_userdata http://codex.wordpress.org/Function_Reference/get_userdata If you need more control, you can initiate a new WP_User http://codex.wordpress.org/Class_Reference/WP_User

Ordering users of a specific role by last name

There is apparently an open ticket about this bug. Here is a workaround that I tested: $args = array( ‘meta_key’ => ‘last_name’, ‘role’ => ‘guest-teacher’ ); $wp_user_query = new WP_User_Query($args); $wp_user_query->query_orderby = str_replace( ‘user_login’, ‘wp_usermeta.meta_value’, $wp_user_query->query_orderby ); $wp_user_query->query(); $authors = $wp_user_query->get_results(); Problem with this is that it runs the query twice.

Connect Users and Taxonomies

I came across a tutorial about ‘Custom User Taxonomies in WordPress‘ and there is a plugin based on that ‘User Taxonomies‘ but these are for creating taxonomies for Users. Have a read thought the tutorial it might help. I think what you’re talking about is to associating posts’ taxonomies with users. I think you need … Read more

Check if WP_User_Query ‘include’ is empty

I think the problem here is that in the process of violating this rule, you’ve created confusion and problems: do 1 thing per statement, 1 statement per line Coupled with another problem: Passing arrays to the APIs which get stored as serialised PHP ( security issue ) And another: Always check your assumptions it ignores … Read more

Show Biographical Info while creating new user

No. There are no hooks or filters to add an input field to the create user form. Maybe it is possible to add an input field via jQuery. I have not tested it. If it is pssible to add an input field, than it should be possible to save this information because the process of … Read more

Validating a new user registration field

After examining the code and much trial and error, I have a solution: There is a filter – user_profile_update_errors – that is called in the file wp-admin/includes/user.php just after WordPress does it’s own input validation. This filter allows plugins to return their own errors by adding them to a referenced WP_Error class. If any errors … Read more