ldap_write_support icon indicating copy to clipboard operation
ldap_write_support copied to clipboard

Displayname missing from LDIF template placeholders

Open awesome-manuel opened this issue 4 years ago • 6 comments

Would it be possible to also have a {displayname} placeholder that gets filled during user creation?

awesome-manuel avatar Feb 06 '20 11:02 awesome-manuel

Not without server/provisioning API changes, as backends do get the userid and a password only for the initial user generation. The user has to exist after this point.

The displayname is provided to the backends somewhat later, so it can be set only later. Delaying the creation is unreliable (would rely on memcache) and can lead ot undefined behaviour (when the LDAP record cannot be written).

blizzz avatar Feb 06 '20 22:02 blizzz

Not without server/provisioning API changes, as backends do get the userid and a password only for the initial user generation. The user has to exist after this point.

The displayname is provided to the backends somewhat later, so it can be set only later. Delaying the creation is unreliable (would rely on memcache) and can lead ot undefined behaviour (when the LDAP record cannot be written).

Would this also be the case if there was a {mail} placeholder for the LDIF template too? I've been searching the records created on openldap and it looks like emails aren't populated on user creation, even when the option 'an LDAP user must have an email set' is selected.

c-nv-s avatar Apr 03 '20 00:04 c-nv-s

Would this also be the case if there was a {mail} placeholder for the LDIF template too?

Yes, as said:

as backends do get the userid and a password only for the initial user generation.

blizzz avatar Apr 09 '20 09:04 blizzz

Could you point us to the hooks that get called on user creation and on update of displayname and mail?

ThyMYthOS avatar Apr 09 '20 10:04 ThyMYthOS

This is being triggered https://github.com/nextcloud/server/blob/master/apps/provisioning_api/lib/Controller/UsersController.php#L241

blizzz avatar May 15 '20 14:05 blizzz

Hey! I`m also missing a few placeholders like mail and first / last name. Any updates to this problem?

Spacelord09 avatar Feb 02 '21 15:02 Spacelord09