summaryrefslogtreecommitdiffstats
path: root/ipa-python
diff options
context:
space:
mode:
authorRob Crittenden <rcrit@ipa.greyoak.com>2008-08-21 10:32:40 -0400
committerRob Crittenden <rcritten@redhat.com>2008-08-22 18:02:20 -0400
commit76bf420754d5dc38ad71f56be456505115e18357 (patch)
tree68fa68926c71d811b229f5892db07c7a9a1fbc5f /ipa-python
parentc7ee747ee50dcf14f3de670bb85e2225fc5d3ac8 (diff)
downloadfreeipa-76bf420754d5dc38ad71f56be456505115e18357.tar.gz
freeipa-76bf420754d5dc38ad71f56be456505115e18357.tar.xz
freeipa-76bf420754d5dc38ad71f56be456505115e18357.zip
Display name as separate attributes instead of showing common name.
We allow one to individually set first and last name but we do not automatically update the common name so changes don't seem to happen. 451318
Diffstat (limited to 'ipa-python')
-rw-r--r--ipa-python/ipaadminutil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipa-python/ipaadminutil.py b/ipa-python/ipaadminutil.py
index 27337642c..5f0b2fa98 100644
--- a/ipa-python/ipaadminutil.py
+++ b/ipa-python/ipaadminutil.py
@@ -33,7 +33,10 @@ def select_user(counter, users):
i = 1
print "%s entries were found. Which one would you like to display?" % counter
for ent in users:
- print "%s: %s (%s)" % (i, ent.getValues('cn'), ent.getValues('uid'))
+ if (ent.getValues('givenname')) is not None:
+ print "%s: %s %s (%s)" % (i, ent.getValues('givenname'), ent.getValues('sn'), ent.getValues('uid'))
+ else:
+ print "%s: %s (%s)" % (i, ent.getValues('sn'), ent.getValues('uid'))
i += 1
while True:
resp = raw_input("Choose one: (1 - %s), 0 for all, q to quit: " % counter)