bb_login

The BuddyPress bb login function.

Description

bb_login( $login, $password, (bool) $remember = false ); 

Parameters (3)

0. $login
The login.
1. $password
The password.
2. $remember — Optional. (bool) => false
The remember.

Usage

  1. if ( !function_exists( 'bb_login' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php'; 
  3.  
  4. // The login. 
  5. $login = null; 
  6.  
  7. // The password. 
  8. $password = null; 
  9.  
  10. // The remember. 
  11. $remember = false; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bb_login($login, $password, $remember); 
  15.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php  
  1. function bb_login( $login, $password, $remember = false ) { 
  2. $user = bb_check_login( $login, $password ); 
  3. if ( $user && !is_wp_error( $user ) ) { 
  4. bb_set_auth_cookie( $user->ID, $remember ); 
  5. do_action('bb_user_login', (int) $user->ID ); 
  6.  
  7. return $user;