def __call__(self, userid, base="", filter_pattern="", scope=SCOPE_SUBTREE,
tls=False, attr=None, attrsonly=False, **kwargs):
if filter_pattern:
_filter = filter_pattern % userid
else:
_filter = self.filter_pattern % userid
_base = base or self.base
_scope = scope or self.scope
_attr = attr or self.attr
_attrsonly = attrsonly or self.attrsonly
arg = [_base, _scope, _filter, _attr, _attrsonly]
res = self.ld.search_s(*arg)
# should only be one entry and the information per entry is
# the tuple (dn, ava)
return res[0][1]
评论列表
文章目录