def check_user_byid(self, user_id):
"""Raise RBFatalError if given id does not belong to a user in
user database."""
if not self.ldap.search_s(rbconfig.ldap_accounts_tree,
ldap.SCOPE_ONELEVEL, 'id=%s' % user_id):
raise RBFatalError("User with id '%s' does not exist" % user_id)
评论列表
文章目录