# \[Updated\] Users not found in Sharing dialogs - reason found

**URL:** <https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709>\
**Category:** Troubleshooting\
**Created:** [June 16, 2025, 7:30am UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709 "2025-06-16T07:30:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![abaer](https://forum.seatable.com/user_avatar/forum.seatable.com/abaer/32/4748_2.png) [@abaer](https://forum.seatable.com/u/abaer)\
**Post date:** [June 16, 2025, 7:30am UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709/1 "2025-06-16T07:30:16Z")

</div>

## Your Setup:

- Containerized Seatable installation on VMware ESX virtual machine running Debian 11
- SeaTable Enterprise 5.2.7 self-hosted

## Describe the Problem/Error/Question:

I have the weird phenomenon with currently one user (out of about 400) which cannot bei seen from the sharing dialog. The user can log in (against our LDAP / AD), can use Seatable, create bases, share them to others, can be invited to bases using a link. The user also appears in the Admin backend.

However, the user cannot be seen from the “direct sharing” or “group administration” dialogues:

 ![grafik](https://forum.seatable.com/uploads/default/original/2X/b/b91da008a36a1fd402a2b2db8ac8fbcb26e69ae9.png)

In the background, the `https://myserver.tld/api2/search-user/?q=oliver` XHR call just returns an empty array. I tried everything I could think of:

- Use different browsers
- Erase the user completely, and have him log in again
- Couldn’t find any other users which behave similar
- Even checked the `ccnet_db.EmailUser` and `dtable_db.profile_profile` to find any obvious differences to other users

So here’s my question: Is there any way I can debug (log files etc.) the `/api2/search-user/` API call. i imagine that that is the culprit.

Added information: On our test system which is largely similar (same user base from LDAP), the same user can be found with no problem. Assuming a corrupted user entry in our production system, I’d really like to find the problem in order to assure reliability.

---

<div class="post-metadata">

**Author:** ![abaer](https://forum.seatable.com/user_avatar/forum.seatable.com/abaer/32/4748_2.png) [@abaer](https://forum.seatable.com/u/abaer)\
**Post date:** [June 18, 2025, 11:40am UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709/2 "2025-06-18T11:40:15Z")

</div>

Hi everyone,

I have found the reason for this, and a possible fix. I’d like to verify the fix with you, especially @daniel.pan @cdb @rdb before I apply it.

The whole issue is loosely related to this post: [Contact E-Mail conflict on some users](https://forum.seatable.com/t/contact-e-mail-conflict-on-some-users/6179)

It turns out for historic reasons unknown, that I have a lot of entries in the `dtable_db.profile_profile` table that have no equivalent entry in the `ccnet_db.EmailUser` table (as linked between the `email` and `user` columns).

Talking SQL - this statement reveals all these orphan entries in dtable\_db:

```sql
select dtb.nickname,dtb.user,cdb.email
from dtable_db.profile_profile as dtb
left join ccnet_db.EmailUser as cdb
on cdb.email=dtb.user
where isnull(cdb.email);

```

First questions:

- Should this statement per definition create an empty list, i.e. every single entry in `profile_profile` should match one in `EmailUsers`?
- **Does anyone else have a system with a non-empty list when running the above SQL statement?**

I cannot exactly tell what the origin of these entries are; maybe they come from some faulty or changing LDAP login, maybe they originated from bugs in previous Seatable versions. However, those ophan entries come in different types:

- One or multiple entries in `profile_profile`, and not a single corresponding entry in `EmailUsers`
  - They are obviously residue from users that have been deleted, but remained in `profile_profile`

- One or more valid records with corresponding records, and lots of orphans in `profile_profile`
  - Those where the ones that blocked the re-usage of E-Mail-Addresses in my other post.
  - The orphans seem to creep up in quite some numbers - the record was 40(!) for one user

Second set of questions towards Seatable

- Is this a known problem, or by design? At least when a user is deleted, are entries purged both from the `EmailUsers` and `profile_profile` tables?
- Should there be no ophans in `profile_profile`?
- Can I fix this safely with the following SQL statement?

```sql
/* non-destructive: Set Nickname to something nobody will search for */
update dtable_db.profile_profile dtb
left join ccnet_db.EmailUser cdb
on cdb.email=dtb.user
set dtb.nickname = 'jljsdjlmi8hjwej'
where isnull(cdb.email);

/* destructive: Delete orphans */
delete from dtable_db.profile_profile
where dtable_db.profile_profile.user not in
(select distinct ccnet_db.EmailUser.email from ccnet_db.EmailUser);

```

Finally comes the explanation how this relates to the original post: The API endpoint `/api2/search_user/` seems to have a limit of 10 entries to retrieve from the `profile_profile` table when making a quick lookup in the “share” dialogue. This, in my case, returns 10 orphans, and not the valid one from the table. Only then are the 10 entries from `profile_profile` validated again `EmailUsers` - resulting in NO results.

After I found out how this works, I found more users where this applies.

---

<div class="post-metadata">

**Author:** ![daniel.pan](https://forum.seatable.com/user_avatar/forum.seatable.com/daniel.pan/32/13_2.png) [@daniel.pan](https://forum.seatable.com/u/daniel.pan)\
**Post date:** [June 18, 2025, 2:07pm UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709/3 "2025-06-18T14:07:39Z")

</div>

Thanks for analyzing the issue, we will check why there are orphan entries in profile\_profile.

In the meanwhile, you can hotfix the problem by using the SQL you posted.

---

<div class="post-metadata">

**Author:** ![abaer](https://forum.seatable.com/user_avatar/forum.seatable.com/abaer/32/4748_2.png) [@abaer](https://forum.seatable.com/u/abaer)\
**Post date:** [June 18, 2025, 3:14pm UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709/4 "2025-06-18T15:14:10Z")

</div>

Sorry to ask again, but is that a positive confirmation that there should be a strict 1:1 relationship between the two tables?

Thanks!

---

<div class="post-metadata">

**Author:** ![daniel.pan](https://forum.seatable.com/user_avatar/forum.seatable.com/daniel.pan/32/13_2.png) [@daniel.pan](https://forum.seatable.com/u/daniel.pan)\
**Post date:** [June 21, 2025, 1:04am UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709/5 "2025-06-21T01:04:29Z")

</div>

> [@abaer](#):
>
> Sorry to ask again, but is that a positive confirmation that there should be a strict 1:1 relationship between the two tables?

Yes, every single entry in `profile_profile` should match one in `EmailUsers`.

---

<div class="post-metadata">

**Author:** ![abaer](https://forum.seatable.com/user_avatar/forum.seatable.com/abaer/32/4748_2.png) [@abaer](https://forum.seatable.com/u/abaer)\
**Post date:** [June 23, 2025, 6:23am UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709/6 "2025-06-23T06:23:15Z")

</div>

Thanks! That’s enough for me to keep going until you have researched the main issue. I assume that you run much bigger systems than I do. If you don’t have the same phenomenon, and nobody else does, that’s probably a problem caused by our sometimes unstable LDAP / AD integration.

If you find the same issue in one of your own systems, you should have enough data for debugging.

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [June 25, 2025, 6:23am UTC](https://forum.seatable.com/t/updated-users-not-found-in-sharing-dialogs-reason-found/6709/7 "2025-06-25T06:23:33Z")

</div>

Closed on June 25, 2025, 6:23am UTC

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