Tagged: members type, registration, xprofile
Hi to all,
i cant understand why this plugin let me to register the member type via registration form, but then when im trying to quering member type in my bp-custom file i receive just empty value!
And before, some months ago, works perfectly!for example:
var_dump(bp_get_member_type(bp_displayed_user_id()));—> bool false
var_dump(bp_get_member_type(get_current_user_id()));—> bool false
var_dump(bp_get_member_type());—> bool false
var_dump(bp_get_member_type(bp_displayed_user_id(),true));—> bool false
var_dump(bp_get_member_type(get_current_user_id(),true));—> bool false
var_dump(bp_get_member_types());—> empty arrayBut the xprofile member type field have the correct value registred by mine bp-costum as suggested in bp codex section:
function using_mt_register_member_types() {
bp_register_member_type( ‘Problem solver’, array(
‘labels’ => array(
‘name’ => ‘Problem solvers’,
‘singular_name’ => ‘Problem solver’,
),
) );bp_register_member_type( ‘Entrepreneur/policy maker’, array(
‘labels’ => array(
‘name’ => ‘Entrepreneur/policy makers’,
‘singular_name’ => ‘Entrepreneur/policy maker’,
),
) );}
add_action( ‘bp_init’, ‘using_mt_register_member_types’ );
What i suspect is that the plugin do not save the right value on the right field… how can i trouble shooting this?
thank a lotHi Lapo,
i just tested the plugin. It is working fine for the new registrations.
Are you sure that user registered through your normal registration process?Please try registering a new user and checking their profile after activation.
I used your code and it is giving me correct result.
Thank you
BrajeshI spot the problem few second ago! it was not a plugin issue, but mine fault! but before it works!
this is the fault code:
add_action( ‘bp_init’, ‘using_mt_register_member_types’ );should set to
add_action( ‘bp_register_member_types’, ‘using_mt_register_member_types’ );so bp_init make the mess!
thanks for your quick reply!
The topic ‘ [Resolved] BuddyPress Xprofile Member Type Field issue’ is closed to new replies.