Changeset 700

Show
Ignore:
Timestamp:
10/23/07 20:34:14 (1 year ago)
Author:
thomasklaiber
Message:

tag 1.2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • admin-add-user/trunk/admin-add-user.php

    r319 r700  
    22/** 
    33 * Plugin Name: Admin add user 
    4  * Plugin Description: Allows Admins to add user through the Administration Panel. 
     4 * Plugin Description: Allows Keymasters to add user through the administration panel. 
    55 * Author: Thomas Klaiber 
    6  * Author URI: http://www.la-school.com 
    7  * Plugin URI: http://bbpress.org/plugins/topic/29 
    8  * Version: 1.1 
     6 * Author URI: http://thomasklaiber.com/ 
     7 * Plugin URI: http://thomasklaiber.com/bbpress/admin-add-user/ 
     8 * Version: 1.2 
    99 */ 
    1010  
     
    5050                $user_id = $bbdb->insert_id; 
    5151                bb_update_usermeta( $user_id, $bb_table_prefix . 'capabilities', array('member' => true) ); 
     52                 
     53                if ($_POST['user_send_email']) : 
     54                        // why doesn't this work? 
     55                        // bb_send_pass( $user_id, $password ); 
     56                         
     57                        $message = __("Your username is: %1\$s \nYour password is: %2\$s \nYou can now log in: %3\$s \n\nEnjoy!"); 
     58 
     59                        bb_mail( 
     60                                bb_get_user_email( $user_id ), 
     61                                bb_get_option('name') . ': ' . __('Password'), 
     62                                sprintf( $message, "$user_login", "$password", bb_get_option('uri') ) 
     63                        ); 
     64                endif; 
    5265         
    5366                do_action('bb_admin_new_user', $user_id, $password); 
     
    5972                $_POST['user_email'] = ""; 
    6073                $_POST['user_url'] = ""; 
     74                $_POST['user_send_email'] = ""; 
    6175        endif; 
    6276 
     
    110124                <input name="pass2" type="password" /></td> 
    111125        </tr> 
     126         
     127        <tr> 
     128                <th scope="row"><? _e('Send Email') ?>:</th> 
     129                <td><label><input name="user_send_email" type="checkbox" value="1" /> <? _e('Notify about registration.') ?></label></td> 
     130        </tr> 
    112131</table> 
    113132<p class="submit">