bp_get_signup_username_value()

Get the username submitted during signup.

Description

Return

(string)

Source

File: bp-members/bp-members-template.php

2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
function bp_get_signup_username_value() {
    $value = '';
 
    // grab the nickname field first
    $nickname_field = 'field_' . bp_xprofile_nickname_field_id();
    if ( isset( $_POST[ $nickname_field ] ) ) {
        $value = $_POST[ $nickname_field ];
    }
    // fallback to grab the username
    else if ( isset( $_POST['signup_username'] ) ) {
        $value = $_POST['signup_username'];
    }
 
    /**
     * Filters the username submitted during signup.
     *
     * @since BuddyPress 1.1.0
     *
     * @param string $value Username submitted during signup.
     */
    return apply_filters( 'bp_get_signup_username_value', $value );
}

Changelog

Changelog
Version Description
BuddyPress 1.1.0 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.