def get_dummyid(self, usr):
"""Set usr.id to unique 'dummy' DCU ID number."""
raise RBFatalError('NOT YET IMPLEMENTED')
res = self.ldap.search_s(rbconfig.ldap_accounts_tree,
ldap.SCOPE_ONELEVEL,
'(&(id>=10000000)(id<20000000))"' % (usr.uid))
if res:
usr.id = int(res[0][1]['id'][0]) + 1
else:
usr.id = 10000000
评论列表
文章目录