Contact E-Mail conflict on some users

Your Setup:

  • Docker installation running on VMware machine
  • Authentication against LDAP
  • SeaTable Edition Enterprise
  • SeaTable Version: 4.4.9

Describe the Problem/Error/Question:

For some of our users I cannot set the contact E-Mail, because it already exists in the user database. However, it does not exist on a visible, duplicate User. I have checked all (?) the relevant (?) documentation regarding authentication and switching authentication methods, and here is what I found out so far:

For the affected users, there is one entry in ccnet_db.EmailUser, but multiple entries in dtable_db.profile_profile (by Name). In one case, up to eight profiles for the same user profile_profile.nickname. Understandably, there is only one profile matching ccnet_db.Email.User.email to dtable_db.profile_profile.user.

The blocked E-Mail addresses are in “dead” entries in profile_profile that are not linked to actual users any more. I can only speculate on how this came about. We never needed to switch from local autentication to LDAP, because we started with LDAP right away.

So here are my questions:

  • Is it possible that when a user is deleted, entry from ccnet_db.EmailUser is deleted, but the one from dtable_db.profile_profile still remains?
  • Is it also possible that the “contact_email” field is not emptied from the orphaned profile, and then blocks the e-mail address when the user comes back?
  • Is it safe to purge the email addresses from unconnected profile entries
  • Is it even safe or sensible to purge the additional profiles, or are they needed as historical references (for changes etc.)?

The latter I would identify with something like

select ccnet.email,dtable.user,dtable.contact_email
from ccnet_db.EmailUser as ccnet
right outer join dtable_db.profile_profile as dtable 
on ccnet.email=dtable.user
where ccnet.email is NULL and dtable.contact_email is not NULL;

I have now manually deleted the blocked E-Mail addresses from the orphaned profile_profile entries, and was then able to manually assign them to the valid users in the Seatable GUI.

Problem solved so far. I could sleep much better if someone could

  1. tell me I didn’t do something wrong
  2. tell me how this (orphaned entries in profile_profile which block e-mail addresses) can happen