1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Permissions in Member Card

Discussion in 'XenForo Questions and Support' started by Rudy, Jan 6, 2016.

  1. Rudy

    Rudy Well-Known Member

    I have figured out how to pull a custom field from a member's profile and display it in the Member Card. I was going to wrap it in a conditional to prevent logged out ("guest") members from viewing it, but that raised two questions for me.

    First, if I display a custom field from the user's profile, does this respect their privacy settings? In other words, I do not want it to display if the member has disallowed it via his or her "View your details on your profile page" privacy settings. Or, do I need to use an additional conditional statement to make it respect those settings? I would actually prefer this, as that way, a member can choose if they want to make it public or not.

    Second, I could still wrap the custom field in a conditional to prevent guests from seeing it, but I am thinking for privacy reasons, perhaps the member card itself could redirect to the login page if a guest member attempts to view it. Was there ever an option made to do this, or is it entirely up to us to do a template edit?
     
  2. Mike

    Mike XenForo Developer Staff Member

    This controls viewing the whole profile, so there's no limit applied at the custom field level. You'd need to wrap it in another conditional.

    The member card is roughly considered to be a "public" version of the profile, so if you want to limit that further, you'd need a template edit.
     
    Rudy likes this.

Share This Page