Backport of #9570

[Issue #9559] identifiers uid=xxx must be considered as user DN and not as owncloud users

File written by blizzz