Include account note in getuser output v0.6.x
authormartin f. krafft <madduck@madduck.net>
Sat, 14 Apr 2012 22:53:21 +0200
branchv0.6.x
changeset 543 1b3bdce0bf87
parent 542 c3b98364f03d
child 544 ff805bd17817
Include account note in getuser output Modify the getuser output to include an account note, if one is present
VirtualMailManager/account.py
--- a/VirtualMailManager/account.py	Sat Apr 14 22:52:40 2012 +0200
+++ b/VirtualMailManager/account.py	Sat Apr 14 22:53:21 2012 +0200
@@ -479,7 +479,7 @@
         raise AErr(_(u'UID must be greater than 0.'), INVALID_ARGUMENT)
     dbc = dbh.cursor()
     dbc.execute("SELECT local_part||'@'|| domain_name.domainname AS address, "
-                "uid, users.gid FROM users LEFT JOIN domain_name ON "
+                "uid, users.gid, note FROM users LEFT JOIN domain_name ON "
                 "(domain_name.gid = users.gid AND is_primary) WHERE uid = %s",
                 (uid,))
     info = dbc.fetchone()
@@ -487,7 +487,7 @@
     if not info:
         raise AErr(_(u"There is no account with the UID: '%d'") % uid,
                    NO_SUCH_ACCOUNT)
-    info = dict(zip(('address', 'uid', 'gid'), info))
+    info = dict(zip(('address', 'uid', 'gid', 'note'), info))
     return info
 
 del _, cfg_dget