# Ok, I'm Stuck. Blocking Users

**URL:** <https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790>\
**Category:** Get Help\
**Created:** [January 9, 2022, 4:59am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790 "2022-01-09T04:59:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 4:59am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/1 "2022-01-09T04:59:32Z")

</div>

As many of you know if you make an app that allows users to upload pictures and whatnot, Apple requires that you also be able to block users.

I cant figure this one out. Not sure what is stumping me, and I know it can be done, but i’m just hitting a roadblock here.

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![James\_App\_Maker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/james_app_maker/32/37288_2.png) [@James\_App\_Maker](https://forum.adalo.com/u/James_App_Maker)\
**Post date:** [January 9, 2022, 5:20am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/2 "2022-01-09T05:20:28Z")

</div>

Hi Bobby,

This is pretty easy.

In your user’s collection, create a true/false property called “Blocked?”

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/8/8dd1d43efd44b96e37ab682f1b6049392a88f0c6.png)

## Blocking Users By Actions

If Logged In User \> Blocked is **false** , link them to the “Create Post” screen. If Blocked is **true** , DON"T link them to the “Create Post” Screen. (link them to a screen that says they are blocked.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/3/3e4ba2f50a50eb6708757630958c3c27ddabbae7.png)

## Blocking Users By Visibilty Conditions

This text will show when the Logged In User is **TRUE**.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/0/0d38b936d5f994c97e18315ce619fff63e54e0ec.png)

## Blocking Users By List Filtering

This list will ONLY show if the user Blocked \> is false.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/c/c6bb441cbcd705f99f43e5adeb376647d3d6eb9d.png)

## How to Block Users

First, you update the user.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/a/a2be30c2729f9eef6e837c6003e0993c37a62f54.png)

Then, you update the “Blocked?” true/false property to **TRUE**.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/9/9b13bbbdb7621076ca91a2c81ffdf446cfa4a8ae.png)

I hope this helps! Good luck with your app!

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 5:25am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/3 "2022-01-09T05:25:00Z")

</div>

James,

Thanks. But I think the requirement is that users can block each other. Happen to have a solution for that?

Sorry, I should have been more clear.

---

<div class="post-metadata">

**Author:** ![James\_App\_Maker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/james_app_maker/32/37288_2.png) [@James\_App\_Maker](https://forum.adalo.com/u/James_App_Maker)\
**Post date:** [January 9, 2022, 5:26am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/4 "2022-01-09T05:26:37Z")

</div>

So do you mean if User A goes on User B’s profile, User A can block User B’s profile?

If I don’t understand what you mean, can you give me a use case?

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 5:29am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/5 "2022-01-09T05:29:18Z")

</div>

Exactly.

Basically Apple wants that If User A is harassed by User B then User A can block User B from contacting them, or even seeing their profile.

---

<div class="post-metadata">

**Author:** ![James\_App\_Maker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/james_app_maker/32/37288_2.png) [@James\_App\_Maker](https://forum.adalo.com/u/James_App_Maker)\
**Post date:** [January 9, 2022, 5:35am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/6 "2022-01-09T05:35:09Z")

</div>

Now I know what you mean. 🙂

Let me try to wrap my head around this

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 5:38am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/7 "2022-01-09T05:38:58Z")

</div>

Thanks!

Ive been trying for a bit. I know it’s possible, but i’m just fried at the moment 😃

---

<div class="post-metadata">

**Author:** ![asashour](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/asashour/32/15116_2.png) [@asashour](https://forum.adalo.com/u/asashour)\
**Post date:** [January 9, 2022, 6:01am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/8 "2022-01-09T06:01:28Z")

</div>

How about having a one-to-many relationship, e.g. User A blocks (B and C).

And then filter the shown users, so that the user X email (or id) is not part of the blocked users of the `current user`.

E.g. Email (id) /is not equal to / Logged in User’s / blocked / email (id)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/1/1225e4de8d36870b2c3e126113c8d741f73f9da5.png)

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 6:02am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/9 "2022-01-09T06:02:34Z")

</div>

A one to many user/user relationship?

---

<div class="post-metadata">

**Author:** ![asashour](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/asashour/32/15116_2.png) [@asashour](https://forum.adalo.com/u/asashour)\
**Post date:** [January 9, 2022, 6:03am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/10 "2022-01-09T06:03:23Z")

</div>

Yes, since user X can block users A, B, C, …

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 6:05am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/11 "2022-01-09T06:05:16Z")

</div>

I could be wrong, but when its a user/user relationship the only way to add multiple users to that field is a many/many relationship, which ive tried and doesnt work our right.

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 9, 2022, 6:05am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/12 "2022-01-09T06:05:43Z")

</div>

Hi Bobby 👋

Like this?

> [@Help to get to delete an email in a text property](https://forum.adalo.com/t/help-to-get-to-delete-an-email-in-a-text-property/21491/4):
>
> Or this way. With Users collection. Hope this helps! Thank you

Thank you

---

<div class="post-metadata">

**Author:** ![asashour](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/asashour/32/15116_2.png) [@asashour](https://forum.adalo.com/u/asashour)\
**Post date:** [January 9, 2022, 6:08am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/13 "2022-01-09T06:08:58Z")

</div>

It works with my sample app.

Many-to-many is better, if user A blocks B, then both block each other.

However, a one-direction block, e.g. A blocks B, but B doesn’t block B, would be a one-to-many relationship.

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 6:09am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/14 "2022-01-09T06:09:39Z")

</div>

So you use two, many to many fields… Let me try that out!

---

<div class="post-metadata">

**Author:** ![James\_App\_Maker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/james_app_maker/32/37288_2.png) [@James\_App\_Maker](https://forum.adalo.com/u/James_App_Maker)\
**Post date:** [January 9, 2022, 6:12am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/15 "2022-01-09T06:12:34Z")

</div>

Hey Bobby,

I’m almost complete with the cloneable.

You can check it out here: (click “Block user to see”)

> **[Adalo Forum Help](https://previewer.adalo.com/bfb4948d-8e87-4ce0-8bb5-028948277a22)**
>
> Built with Adalo

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 6:35am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/16 "2022-01-09T06:35:52Z")

</div>

Thanks, James.

Let me ask you this. Using this method, how would you filter a list of users so that you cannot see any of the users that have you blocked or that you have blocked.

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 6:53am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/17 "2022-01-09T06:53:27Z")

</div>

I think I got it… When I blocked the user i was only updating the logged in user, with the user im blocking, I also need to update the current user’s “users blocking me”

What a pain 😃

Thank you all!

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 9, 2022, 6:58am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/18 "2022-01-09T06:58:42Z")

</div>

> [@Bobby](#):
>
> Thank you all!

Your Welcome Bobby! Happy to help!

All the best with your app 👊

---

<div class="post-metadata">

**Author:** ![charleshope](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/charleshope/32/25088_2.png) [@charleshope](https://forum.adalo.com/u/charleshope)\
**Post date:** [January 9, 2022, 7:52am UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/19 "2022-01-09T07:52:04Z")

</div>

Glad that’s sorted.

I was going to suggest checking the followers tutorial on YouTube and adapt that to blocking users.

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 9, 2022, 5:17pm UTC](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790/20 "2022-01-09T17:17:40Z")

</div>

Yeah, I dont know why a double relationship never occurred to me.

[Next page](https://forum.adalo.com/t/ok-im-stuck-blocking-users/21790.md?page=2)
