Question

I am building a buddypress/bbpress, website with xprofile registration fields. I am using New User Approve plugin to approve each users manually since we need to check information of each user before they get activated.

Problem here is, I am unable to check/view the xprofile field values in Wordpress user edit admin panel. All I have is the username change password, changing roles etc. I want the admin panel to display the extra information of the registered user so that I can check the info and approve . Anyone can help me out to solve this problem.

Was it helpful?

Solution

Might be similar to this.. haven't tried the code though.... Replace the key value 'xprofile_key_birthday' with actual xprofile keys in Buddypress DB.

Note: This code only displays the values on the edit screen and doesn't insert or update anything.

<?php 
add_action( 'show_user_profile', 'showmy_extra_profile_fields' );
add_action( 'edit_user_profile', 'showmy_extra_profile_fields' );
function showmy_extra_profile_fields( $user ) { ?>
    <h3>Extra profile information</h3>
    <table class="form-table">
        <tr>
            <th><label>xprofile_key_birthday</label></th>
            <td>
                <?php 
                if( function_exists( 'xprofile_get_field_data' ) ) {
                    $xprofile_value = xprofile_get_field_data('xprofile_key_birthday', $user->ID );
                }
                else {
                    $xprofile_value = '';
                }
                ?>
                <input type="text" name="xprofile_key_birthday" id="xprofile_key_birthday" value="<?php echo esc_attr( $xprofile_value ); ?>" class="regular-text" readonly />
            </td>
        </tr>

    </table>
<?php 
}
?>

OTHER TIPS

I use the free Wangguard plugin on my BuddyPress/bbPress website. All I need to do is click on "Users" in the Wangguard menu on Wordpress dashboard sidebar and then click on "BP Profile" under the member username column. I can view and even edit the member profile from there. Hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top