def usr2ldap_rename(cls, usr):
"""Return a list of (type, attribute) pairs for given user.
This list is used in LDAP modify queries for renaming."""
return ((ldap.MOD_REPLACE, 'homeDirectory', usr.homeDirectory),
(ldap.MOD_REPLACE, 'updatedby',
usr.updatedby), (ldap.MOD_REPLACE, 'updated', usr.updated))
评论列表
文章目录