Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress X-profile field format changed

  • I have extended profile field using checkbox type, Its previously stored only the value like “Man” in bp_xprofile_data table when this field used as radio type after change to checkbox type its stored like below,

    a:1:{i:0;s:3:”Man”;}

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    That is a serialized array. BP will unserialize it for you.

    If you want to check it:
    Get the profile field in php, then run it through maybe_unserialize.

    $profile_field = maybe_unserialize( $profile_field );
    
    echo $profile_field[0]; // should show 'Man'

    How can i change this like before, means need to store only value in database not serialised array

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar