bbp_login_notices()
Handle the login and registration template notices
Description
Source
File: bp-forums/users/template.php
function bbp_login_notices() {
// loggedout was passed
if ( !empty( $_GET['loggedout'] ) && ( true === $_GET['loggedout'] ) ) {
bbp_add_error( 'loggedout', __( 'You are now logged out.', 'buddyboss' ), 'message' );
// registration is disabled
} elseif ( !empty( $_GET['registration'] ) && ( 'disabled' === $_GET['registration'] ) ) {
bbp_add_error( 'registerdisabled', __( 'New user registration is currently not allowed.', 'buddyboss' ) );
// Prompt user to check their email
} elseif ( !empty( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm', 'newpass', 'registered' ) ) ) {
switch ( $_GET['checkemail'] ) {
// Email needs confirmation
case 'confirm' :
bbp_add_error( 'confirm', __( 'Check your e-mail for the confirmation link.', 'buddyboss' ), 'message' );
break;
// User requested a new password
case 'newpass' :
bbp_add_error( 'newpass', __( 'Check your e-mail for your new password.', 'buddyboss' ), 'message' );
break;
// User is newly registered
case 'registered' :
bbp_add_error( 'registered', __( 'Registration complete. Please check your e-mail.', 'buddyboss' ), 'message' );
break;
}
}
}
Changelog
| Version | Description |
|---|---|
| bbPress (r2970) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.