userManager & LDAP-id


For my occ I am using the userManager to get the correct user-id from the console input

$user = this->userManager->get($userId);

But this does not work for LDAP users. There I would need to input the LDAP-Id which is not really convenient.

Any suggestion on how to work with the LDAP display ID?

The event:


Is helpful for that I think.

I think I did not understand what I should do with that.
how should I get the LDAP ID for a userID with this?


I don’t really get the problem then. Can you explain with some sample calls what you think you need to do?


thank you for coming back on this.
correct me if either myself and/or the user has a misunderstanding of LDAP here.

the user wants to run an OCC with his userid
occ audioplayer:scan abc

but this does not work as he has an LDAP user an he needs to use his login name (same as the data folder)
occ audioplayer:scan A69BE269-1061-6969-A696-696...969

I am using the userManager to get to the user object.
is it possible to recognize and derive a mapping of the user-id to the LDAP-ID?