bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

No Admin notification of new user

(5 posts)
  • Started 4 months ago by MichaelKlasno
  • Latest reply from _ck_
  • This topic is not resolved
  1. MichaelKlasno
    Member

    I have a bbpress installed and working but I don't get new user notifications. This is a stand alone application.

    Any help?
    Michael

    Posted 4 months ago #
  2. There is no admin notification of new registrations by default. Sounds like it could be done with a plugin.

    Posted 4 months ago #
  3. Wow I can't believe bbPress doesn't do that.

    I've whipped up a function to do it, should be in the plugin browser soon or try this:

    <?php
    /*
    Plugin Name:  New User Notification Email
    */
    add_action('bb_new_user', 'new_user_notification');
    
    function new_user_notification($user_id=0) {
    	if (!$user_id) {$user_id=bb_get_current_user_info( 'id' );}
    	$user=bb_get_user($user_id); 
    
    	$message  = sprintf(__('New user registration on %s:'), bb_get_option('name')) . "\r\n\r\n";
    	$message .= sprintf(__('Username: %s'), stripslashes($user->user_login)) . "\r\n\r\n";
    	$message .= sprintf(__('E-mail: %s'), stripslashes($user->user_email)) . "\r\n\r\n";	
    
    	$message .= sprintf(__('Agent: %s'), substr(stripslashes($_SERVER["HTTP_USER_AGENT"]),0,80)) . "\r\n\r\n";
    	$message .= sprintf(__('IP: %s'), $_SERVER['REMOTE_ADDR']) . "\r\n\r\n";	
    
    	$message .= sprintf(__('Profile: %s'), get_user_profile_link($user_id)) . "\r\n\r\n";
    
    @bb_mail(bb_get_option('admin_email') , sprintf(__('[%s] New User Registration'), bb_get_option('name')), $message, '' );
    }
    ?>
    Posted 4 months ago #
  4. As long as this has a checkbox to turn on and off! I don't know if I could handle getting notified if I had 1000 registrations a day, but is nice on a site with just a few registrations! Thanks _ck_ !

    Trent

    Posted 4 months ago #
  5. It's a formal plugin now:
    http://bbpress.org/plugins/topic/new-user-notification/

    There's probably only a handful of bbPress sites in existence that get more than a dozen registrations per day right now but they don't want to put it in the core, so that's fine. Simply deactivate it if getting too many emails. Then there's gmail which can keep track of all of the registration threads as a single thread.

    (When the backpress integration is more complete I suspect this will then be in the core with the WordPress functions which has had it for years now, even on the biggest sites)

    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.