ERROR: Please enter a username."; elseif (bb_user_exists(sanitize_user($_POST['user_login'], true))) : $admin_add_user_error['user_login'] = "
  • ERROR: This username is already taken.
  • "; endif; if (empty($_POST['user_email'])) : $admin_add_user_error['email'] = "
  • ERROR: Please type an e-mail address.
  • "; endif; if (empty($_POST['pass1']) || empty($_POST['pass2'])) : $admin_add_user_error['password'] = "
  • ERROR: Please enter your password twice.
  • "; elseif ($_POST['pass1'] != $_POST['pass2']) : $admin_add_user_error['password'] = "
  • ERROR: You passwords must match.
  • "; endif; if (!$admin_add_user_error) : $user_login = $_POST['user_login']; $user_email = $_POST['user_email']; $user_url = bb_fix_link( $_POST['user_url'] ); $password = $_POST['pass1']; if ( $user_id = bb_new_user( $user_login, $user_email, $user_url ) ) { bb_update_user_password( $user_id, $password ); bb_update_usermeta( $user_id, $bbdb->prefix . 'capabilities', array('member' => true) ); if ($_POST['user_send_email']) : /** * Sending a mail again is bad, but if we don't do this, * the user gets a wrong password sent. * The bb_new_user() function can't be prevented from sending the first mail. */ $message = __("PLEASE IGNORE THE FIRST MAIL!\n\nYour username is: %1\$s \nYour new password is: %2\$s \nYou can now log in: %3\$s \n\nEnjoy!"); bb_mail( $user_email, bb_get_option('name') . ': ' . __('Password'), sprintf( $message, $user_login, $password, bb_get_option('uri') ) ); endif; do_action('bb_admin_new_user', $user_id, $password); } $admin_add_user_success['user_login'] = "
  • User ".$user_login." has been added. Edit user's profile »
  • "; // clear for next use $_POST['user_login'] = ""; $_POST['user_email'] = ""; $_POST['user_url'] = ""; $_POST['user_send_email'] = ""; endif; if ($admin_add_user_error) : ?>

    Users can register themselves or you can manually create users here.

    :
    :
    :
    (twice):
    :