Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: restrict messages to user-admin-user

@ekko848

Participant

I was googling this and came to this thread. Ended taking some hints from it and edited my compose.php to look like this:

 <?php if ( bp_current_user_can( 'bp_moderate' ) ) : ?>
    <label for="send-to-input"><?php _e("Send To (Username or Friend's Name)", 'buddypress' ); ?></label>
	<ul class="first acfb-holder">
		<li>
			<?php bp_message_get_recipient_tabs(); ?>
			<input type="text" name="send-to-input" class="send-to-input" id="send-to-input" />
		</li>
	</ul>
    <?php else : ?>
    <label for="send-to-input"><?php _e("SEND MESSAGE TO ADMIN", 'buddypress' ); ?></label>
	<ul class="first acfb-holder">
		<li>
			<?php bp_message_get_recipient_tabs(); ?>
			<input type="hidden" name="send-to-input" class="send-to-input" id="send-to-input" value="admin"/>
		</li>
	</ul>
	<?php endif; ?>

Just did some initial testing and it seems to work properly..

Skip to toolbar