Login problems | ldap user imported twice after move to new OU

Hello all,

When moving my user to another OU within my ldap server, I noticed that Nextcloud has imported some new users, but since they already existed, a second user was created with the addition β€œ_1234”. This leads to the fact that the old user can no longer be logged in with a direct login and Nextcloud wants to set up the new user. With SSO authentication, the old user can still be used.

I have now looked at the database entries of the accounts and have found that even old already deleted users are still included in the database but are no longer displayed by Nextcloud under β€œUsers”.

Now it is also so that not all users that I have moved in the ldap were re-imported. Only users older than 6 months were re-imported the new users from the last weeks are all ok.

Does anyone have a solution for this and is it possible in future updates to include a fix for the database control, which ensures that deleted users actually disappear from the database?