• Modify the following function to allow the developer to add an error message if the user has not verified. Thank you!

    /* register-plus-redux/rpr-login.php */

    public /*.object.*/ function rpr_authenticate( /*.object.*/ $user, /*.string.*/ $username, /*.string.*/ $password) {
    if ( !empty($user) && !is_wp_error( $user ) ) {
    if ( NULL !== get_role( ‘rpr_unverified’ ) && in_array( ‘rpr_unverified’, $user->roles ) ) {
    //return null;
    return new WP_Error( ‘unverified’, __( “You have not yet verified your email address, please find the verification email you should have received immediately after you registered. The email was sent by [email protected]” ) );
    }
    }
    return $user;
    }

    https://ww.wp.xz.cn/plugins/register-plus-redux/

The topic ‘Allow developer to customize verification error message’ is closed to new replies.