Support » Plugin: BuddyPress Registration Options » Delegate which admin gets new member request?

  • Resolved kkrohn21

    (@kkrohn21)


    Hello – We have a handful of admins on our site because different people handle different backend functions. Unfortunately, all admins are receiving new member request emails. Is there a way to assign just one person or email address to receive new member requests?

    Thanks,
    Kara

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    We have a filter named ‘bprwg_bp_notification_users’ which by default returns all administrators. If you want, I can type up some quick code that uses that filter to return just the user(s) you want to handle moderation. Just let me know their user ID. Alternatively, if you want to have it query by email address, we can get that detail provided privately, so that you’re not having to publish it on the forum here. User ID would be ideal at this point though.

    kkrohn21

    (@kkrohn21)

    Can it go to two users? User names sbragg and kkrohn

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Give this a quick go in your theme’s functions.php file.

    function kkrohn_custom_admin_user_notifications() {
    	// Get some user objects
    	$user1 = get_user_by( 'slug', 'sbragg' );
    	$user2 = get_user_by( 'slug', 'kkrohn' );
    
    	$users = array();
    	if ( false !== $user1 ) {
    		$users[] = $user1;
    	}
    	if ( false !== $user2 ) {
    		$users[] = $user2;
    	}
    
    	return $users;
    } 
    add_filter( 'bprwg_bp_notification_users', 'kkrohn_custom_admin_user_notifications' );
    

    Added this to the function.php file of our theme and received the following error:

    Syntax error, unexpected ‘=’, expecting T_PAAMAYIM_NEKUDOTAYIM

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure why the code above would invoke that one because I’m not using object orientated programming at all, at least not directly, and that error is related to that.

    On the flipside, that also tells me that you’re running a really old version of PHP, and if it’s possible to get where you’re running the website from, updated, you’ll reap a lot of benefits.

    Does it provide a line number for the error, and would you be willing to share the entire file?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Delegate which admin gets new member request?’ is closed to new replies.