matomo-org / matomo-org/plugin-LoginLdap
Unnecesarry warning on first LDAP user sync
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 37
- Forks
- 30
- Avg merge
- 22h 53m
- Merged PRs (30d)
- 19
Description
When LDAP user has already their account in matomo DB created manually, then on their first login warning is logged:
```
Unable to synchronize LDAP user 'userloginhere', non-LDAP user with same name exists.
```
No such warning on further logins of same user.
Seems [this warning](https://github.com/matomo-org/plugin-LoginLdap/blob/f44b91dea3b1a16e8ceab12e6df6d2154e1fedfa/LdapInterop/UserSynchronizer.php#L156) makes no sense because [after this warning user is marked as synced from LDAP](https://github.com/matomo-org/plugin-LoginLdap/blob/f44b91dea3b1a16e8ceab12e6df6d2154e1fedfa/LdapInterop/UserSynchronizer.php#L172) and further updates from LDAP work fine for them.
Consider removing this warning and always update user from LDAP if LDAP user sync is enabled and user matches.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in LdapInterop/UserSynchronizer.php around the warning at line 156 and the sync state handling near line 172. Reproduce the first login for an LDAP user whose Matomo account was created manually, then verify that the warning is no longer logged while LDAP updates still apply on the first and subsequent logins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100