• Ramakrishnan

    (@egrovesys)


    Hi Brajesh Singh,

    How to handle the visibility part if using xprofile_get_field_data

    like below

    <span class="<?php echo(xprofile_get_field_visibility_level( 'Date of Birth', $memberId)); ?>"><?php echo xprofile_get_field_data( 'Date of Birth', $memberId); ?></span>

    any help, please.

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi Ramakrishnan,
    You will need to manually put the conditions or filter on ‘xprofile_get_field_data’.

    This is not related to this plugin and what you are looking for is a core BuddyPress functionality.

    I am not able to supply a code as it will depend on your implementation.

    Here is the strategy though:-
    1. Fetch the level
    2. Check if the level allows current user(logged in or not) to view the details.
    3. if allows, show.

    Regards
    Brajesh

Viewing 1 replies (of 1 total)
  • The topic ‘How to handle the visibility part if using xprofile_get_field_data’ is closed to new replies.