# Stumped about users

**URL:** <https://community.glideapps.com/t/stumped-about-users/62637>\
**Category:** Ask for Help\
**Created:** [June 10, 2023, 11:53pm UTC](https://community.glideapps.com/t/stumped-about-users/62637 "2023-06-10T23:53:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeartwoodTreeCo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/heartwoodtreeco/32/8150_2.png) [@HeartwoodTreeCo](https://community.glideapps.com/u/HeartwoodTreeCo)\
**Post date:** [June 10, 2023, 11:53pm UTC](https://community.glideapps.com/t/stumped-about-users/62637/1 "2023-06-10T23:53:58Z")

</div>

We have several in-house apps for employee use. They are different enough from each other that it doesn’t make sense to combine them into a single app. I’m trying to unify the users table for all of them and I’d like it to be current employees. It also would be necessary for the staff users table to be a Glide table to share across the different apps.

My question is how to deal with former employees. I set up a deactivation action - delete the row in the users table and add it to an inactive staff table, but I realized that orphaned rows in at least one of the apps.

I don’t know how to only allow a filtered group of the users table to have access and user profiles don’t work with computed columns. When a staff member joins or leaves, I’d like to be able to make that update in one place and have all the apps synced.

Any help?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 11, 2023, 1:04am UTC](https://community.glideapps.com/t/stumped-about-users/62637/2 "2023-06-11T01:04:34Z")

</div>

Not sure how rows are being orphaned…is it because you’re making relations via email address or rowID?

Two possible options:

1. Use a separate glide table for whitelisting. Keep this table up to date with those that can sign in. This way, you don’t need to delete anyone from the users table, but it will effectively double the amount of user rows in your app.
2. When you deactivate a user, don’t delete the row, but simply change the email address of the user. This way, the data is still there, but the user won’t be able to sign in.

---

<div class="post-metadata">

**Author:** ![HeartwoodTreeCo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/heartwoodtreeco/32/8150_2.png) [@HeartwoodTreeCo](https://community.glideapps.com/u/HeartwoodTreeCo)\
**Post date:** [June 11, 2023, 1:24am UTC](https://community.glideapps.com/t/stumped-about-users/62637/3 "2023-06-11T01:24:05Z")

</div>

Hi Robert - thanks for the suggestions.

I was using relations on the Row ID of my users table.

So for option 2 would you just replace the email with a dummy email, maybe the same one for all the inactives?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 11, 2023, 1:33am UTC](https://community.glideapps.com/t/stumped-about-users/62637/4 "2023-06-11T01:33:17Z")

</div>

Would have a template column of something like “[archived+abc@example.com](mailto:archived+abc@example.com)”. That way you know that account originally belongs to [abc@example.com](mailto:abc@example.com), just in case you need to revert it.

---

<div class="post-metadata">

**Author:** ![HeartwoodTreeCo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/heartwoodtreeco/32/8150_2.png) [@HeartwoodTreeCo](https://community.glideapps.com/u/HeartwoodTreeCo)\
**Post date:** [June 11, 2023, 1:52am UTC](https://community.glideapps.com/t/stumped-about-users/62637/5 "2023-06-11T01:52:19Z")

</div>

Makes sense, thanks for the input

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 11, 2023, 2:29am UTC](https://community.glideapps.com/t/stumped-about-users/62637/6 "2023-06-11T02:29:50Z")

</div>

> [@HeartwoodTreeCo](#):
>
> So for option 2 would you just replace the email with a dummy email

Exactly. I do exactly as @ThinhDinh mentioned by creating a dummy email like `archived_email@domain.com`

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 11, 2023, 2:50am UTC](https://community.glideapps.com/t/stumped-about-users/62637/7 "2023-06-11T02:50:23Z")

</div>

> [@Robert\_Petitto](#):
>
> Exactly. I do exactly as @ThinhDinh mentioned by creating a dummy email like `archived_email@domain.com`

The only issue with that is that it can break relations to other data, if you’ve been using emails to create relations (another reason why it’s better to use RowIDs for relations).

I generally use your first option…

> [@Robert\_Petitto](#):
>
> Use a separate glide table for whitelisting. Keep this table up to date with those that can sign in. This way, you don’t need to delete anyone from the users table, but it will effectively double the amount of user rows in your app.

When a new user is added, I’ll send a webhook and then use the API to add the user to the whitelist table, and set their role at the same if (if roles are used).

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [June 11, 2023, 8:22am UTC](https://community.glideapps.com/t/stumped-about-users/62637/8 "2023-06-11T08:22:27Z")

</div>

> [@HeartwoodTreeCo](#):
>
> My question is how to deal with former employees. I set up a deactivation action - delete the row in the users table and add it to an inactive staff table, but I realized that orphaned rows in at least one of the apps.

In Settings \> Data, you can delete all data related to a user (email address). Would that be an option?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 20, 2023, 11:49am UTC](https://community.glideapps.com/t/stumped-about-users/62637/9 "2023-06-20T11:49:44Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
