bbp_login_notices

Handle the login and registration template notices.

Description

bbp_login_notices(); 

Usage

  1. if ( !function_exists( 'bbp_login_notices' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/users/template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_login_notices(); 
  7.  

Defined (1)

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

/includes/users/template.php  
  1. function bbp_login_notices() { 
  2.  
  3. // loggedout was passed 
  4. if ( !empty( $_GET['loggedout'] ) && ( true === $_GET['loggedout'] ) ) { 
  5. bbp_add_error( 'loggedout', __( 'You are now logged out.', bbpress ), 'message' ); 
  6.  
  7. // registration is disabled 
  8. } elseif ( !empty( $_GET['registration'] ) && ( 'disabled' === $_GET['registration'] ) ) { 
  9. bbp_add_error( 'registerdisabled', __( 'New user registration is currently not allowed.', bbpress ) ); 
  10.  
  11. // Prompt user to check their email 
  12. } elseif ( !empty( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm', 'newpass', 'registered' ) ) ) { 
  13.  
  14. switch ( $_GET['checkemail'] ) { 
  15.  
  16. // Email needs confirmation 
  17. case 'confirm' : 
  18. bbp_add_error( 'confirm', __( 'Check your e-mail for the confirmation link.', bbpress ), 'message' ); 
  19. break; 
  20.  
  21. // User requested a new password 
  22. case 'newpass' : 
  23. bbp_add_error( 'newpass', __( 'Check your e-mail for your new password.', bbpress ), 'message' ); 
  24. break; 
  25.  
  26. // User is newly registered 
  27. case 'registered' : 
  28. bbp_add_error( 'registered', __( 'Registration complete. Please check your e-mail.', bbpress ), 'message' ); 
  29. break;