From d615e4dafb9c4f3d737143f826ed20be918317fe Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 20 Oct 2008 16:12:19 -0400 Subject: Port pwpolicy plugin to use b_ldap Add basic output_for_cli() function to user-show --- ipalib/plugins/f_user.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipalib/plugins/f_user.py') diff --git a/ipalib/plugins/f_user.py b/ipalib/plugins/f_user.py index 8b4def80f..6aebddfa4 100644 --- a/ipalib/plugins/f_user.py +++ b/ipalib/plugins/f_user.py @@ -281,6 +281,10 @@ class user_show(crud.Get): dn = ldap.find_entry_dn("uid", uid) # FIXME: should kw contain the list of attributes to display? return ldap.retrieve(dn) + def output_for_cli(self, user): + if user: + for a in user.keys(): + print "%s: %s" % (a, user[a]) api.register(user_show) -- cgit