summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/f_user.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-12-20 15:00:00 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-12-20 15:00:00 -0700
commit6fdf5d1e7bb2171646e17cac835be54a4104b5ac (patch)
tree85c084784809b3592d109a116792a0621130146f /ipalib/plugins/f_user.py
parent9a69adeef001ddd0c55513271cf02eedc0a9aef8 (diff)
parentc025ed6404e147f19b71b398e920fd1b3a05452a (diff)
downloadfreeipa.git-6fdf5d1e7bb2171646e17cac835be54a4104b5ac.tar.gz
freeipa.git-6fdf5d1e7bb2171646e17cac835be54a4104b5ac.tar.xz
freeipa.git-6fdf5d1e7bb2171646e17cac835be54a4104b5ac.zip
Merge branch 'master' of git://git.engineering.redhat.com/users/rcritten/freeipa2
Diffstat (limited to 'ipalib/plugins/f_user.py')
-rw-r--r--ipalib/plugins/f_user.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/ipalib/plugins/f_user.py b/ipalib/plugins/f_user.py
index 45ee59f4..04d7c930 100644
--- a/ipalib/plugins/f_user.py
+++ b/ipalib/plugins/f_user.py
@@ -264,17 +264,18 @@ class user_find(crud.Find):
search_fields_conf_str = config.get('ipausersearchfields')
search_fields = search_fields_conf_str.split(",")
+ search_kw = {}
for s in search_fields:
- kw[s] = term
+ search_kw[s] = term
object_type = ldap.get_object_type("uid")
if object_type and not kw.get('objectclass'):
- kw['objectclass'] = object_type
+ search_kw['objectclass'] = object_type
if kw.get('all', False):
- kw['attributes'] = ['*']
+ search_kw['attributes'] = ['*']
else:
- kw['attributes'] = default_attributes
- return ldap.search(**kw)
+ search_kw['attributes'] = default_attributes
+ return ldap.search(**search_kw)
def output_for_cli(self, textui, result, uid, **options):
counter = result[0]
@@ -287,7 +288,9 @@ class user_find(crud.Find):
return
textui.print_name(self.name)
for u in users:
- textui.print_plain('%(givenname)s %(sn)s:' % u)
+ gn = u.get('givenname', '')
+ sn= u.get('sn', '')
+ textui.print_plain('%s %s:' % (gn, sn))
textui.print_entry(u)
textui.print_plain('')
if counter == -1: