Convert usernames listed by the Groups plugin shortcode to displayed names?

Bellow is the adapted function (by 24 rows shorter than the original), as was suggested by the commenters (many thanks!). It will work only if the Groups plugin was installed and activated. add_shortcode( ‘groups_group_info’, ‘groups_group_info’ ); function groups_group_info( $atts, $content = null ) { global $wpdb; $output = “”; $options = shortcode_atts( array( ‘group’ => … Read more

WordPress multi user registration sites

References I found several plugins and solutions for this. The most promising seemed to be MultiUser Management Plugin. Here’s a short and untested rip off from this plugin, as there’re easier ways to get the available/registered blogs and normally you won’t need their public API functions. Also I think that some stuff they use is … Read more

get USER ID in functions.php using user_register action

You are giving $wpdb->get_results a string for its second parameter. It should be a constant– ARRAY_N— meaning you need to remove the quotes $getunion = $wpdb->get_results( “SELECT value from wp_bp_xprofile_data where user_id = $getid AND field_id = 4”, ARRAY_N ); Since you claim it works in the second instance, I am assuming $wpdb compensates, but … Read more

Modify Profile Biographical Info Field

thanks @toscho A quick tweak on toscho’s Remove Bio Box code add_action( ‘personal_options’, array ( ‘T5_Hide_Profile_Bio_Box’, ‘start’ ) ); /** * Captures the part with the biobox in an output buffer and removes it. * * @author Thomas Scholz, <[email protected]> * */ class T5_Hide_Profile_Bio_Box { /** * Called on ‘personal_options’. * * @return void */ … Read more

Restrict access to certain dashboard pages based on user id

I would just disable the editor entirely. It is a dangerous tool anyway. I compare it to working on an airplane while its flying. Edit wp-config.php to add: define(‘DISALLOW_FILE_EDIT’,true); You can reverse that by re-editing your wp-config.php and uploading over FTP (or maybe you have direct file access), as you should be doing anyway, but … Read more

Redirect authors from upload.php url to Home page in Multisite

If I understand you, he hook you want (WordPress 3.5.1) is load-upload.php. Proof of concept: function t_wpse_94284() { wp_redirect(home_url()); exit; } add_action(‘load-upload.php’,’t_wpse_94284′); That hook should fire only on /wp-admin/upload.php and, though I haven’t tested it, I think that your function should work just fine as it is.