Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Getting a value from one of the users xprofile fields

@shanebp

Moderator

You don’t really need ‘prepare’ for a hard-coded query.

Your error is due to ‘prepare’ using of sprintf-like approach.
Read the codex: wpdb

Why use Select * when you only need ‘value’?
Why use get_row when you only need a single value? See ‘get_var’ in the link above.

But why are you making a wpdb call?

If you’re not in the member loop or on a member page, try
$radius = xprofile_get_field_data('name-of-radius-field', $user_id);
Otherwise, try:
bp_get_member_profile_data('field=name-of-radius-field');

Skip to toolbar