bb_send_pass

Sends an email with the user's new password.

Description

bb_send_pass( (int|string) $user, (string) $pass ); 

}

Parameters (2)

0. $user (int|string)
The user.
1. $pass (string)
The pass.

Usage

  1. if ( !function_exists( 'bb_send_pass' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-users.php'; 
  3.  
  4. // The user. 
  5. $user = null; 
  6.  
  7. // The pass. 
  8. $pass = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_send_pass($user, $pass); 
  12.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/functions.bb-users.php  
  1. function bb_send_pass( $user, $pass ) 
  2. if ( !$user = bb_get_user( $user ) ) { 
  3. return false; 
  4.  
  5. $message = sprintf( 
  6. __( "Your username is: %1\$s \nYour password is: %2\$s \nYou can now log in: %3\$s \n\nEnjoy!" ),  
  7. $user->user_login,  
  8. $pass,  
  9. ); 
  10. $message = apply_filters( 'bb_send_pass_message', $message, $user, $pass ); 
  11.  
  12. $subject = sprintf( 
  13. __( '%s: Password' ),  
  14. bb_get_option( 'name' ) 
  15. ); 
  16. $subject = apply_filters( 'bb_send_pass_subject', $subject, $user ); 
  17.  
  18. return bb_mail
  19. bb_get_user_email( $user->ID ),  
  20. $subject,  
  21. $message 
  22. );