Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function soflyy_get_bp_name( $user_id ) {
- global $wpdb;
- $table = $wpdb->prefix . 'bp_xprofile_data';
- $results = $wpdb->get_row( $wpdb->prepare( "SELECT `value` FROM `" . $table . "` WHERE `user_id` = '%d' AND `field_id` = '1' LIMIT 1", $user_id ) );
- if ( !empty( $results->value ) ) {
- return $results->value;
- }
- return null;
- }
Add Comment
Please, Sign In to add comment