|
@ -88,7 +88,11 @@ class LILiK_USER(object): |
|
|
raise NameError('Unknown user attribute: %s'%service_changed) |
|
|
raise NameError('Unknown user attribute: %s'%service_changed) |
|
|
elif changed in self._attributes: |
|
|
elif changed in self._attributes: |
|
|
if changed == 'cn': |
|
|
if changed == 'cn': |
|
|
firstname, surname = new_lilik_user[changed].rsplit(' ', 1) |
|
|
|
|
|
|
|
|
try: |
|
|
|
|
|
firstname, surname = new_lilik_user[changed].strip().rsplit(' ', 1) |
|
|
|
|
|
except ValueError: |
|
|
|
|
|
firstname = new_lilik_user[changed].strip() |
|
|
|
|
|
surname = " " |
|
|
modifiers[user_cn]['sn'] = [(ldap3.MODIFY_REPLACE, [surname])] |
|
|
modifiers[user_cn]['sn'] = [(ldap3.MODIFY_REPLACE, [surname])] |
|
|
modifiers[user_cn]['givenname'] = [(ldap3.MODIFY_REPLACE, [firstname])] |
|
|
modifiers[user_cn]['givenname'] = [(ldap3.MODIFY_REPLACE, [firstname])] |
|
|
modifiers[user_cn][changed] = [(ldap3.MODIFY_REPLACE, [new_lilik_user[changed]])] |
|
|
modifiers[user_cn][changed] = [(ldap3.MODIFY_REPLACE, [new_lilik_user[changed]])] |
|
|