How do i implement a block and private profile function in bubble

what is the best way for me to allow a user to set their profile page to private or to block other users from seeing their profile? i would have a button that the current user presses on another person’s profile that says “block this user”, but then how do i make sure the profile’s user isnt able to see the current user’s profile? do i just have apply a condition to the profile that says Not Visible if profile user’s blocked list contains current user?

not sure about how to make a profile private though.

Can do it conditionally with logic, as you’re describing.

A more secure way would be to do it with database security. Set each user to only be allowed to view data from all user except the one’s that they’ve been blocked from. (I haven’t done this before so only 90% certain it works)

Hi @aphz88 :slight_smile: To setup private profiles, you can create a field within the User such as “PrivateAccount”, Type: yes/no, List: No, Default value: No" (unless you’d prefer to have profiles be private by default, then it would be yes of course).

Then you can place a text element on the profile page such as:
“This profile is private.” (Conditional: If Current Page User’s PrivateAccount is Yes and Current Page User’s friends doesn’t contain Current User") --> This element is visible.

Then use that same conditional statement on the group which contains the Profile Information, such as a repeating group of pictures:
(Conditional: If Current Page User’s PrivateAccount is Yes and Current Page User’s Friends doesn’t contain Current User") --> This element is not visible.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.