mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] style
This commit is contained in:
parent
d0666d86d6
commit
c8ce4f843a
1 changed files with 11 additions and 6 deletions
|
@ -51,11 +51,14 @@ def user_list(auth, fields=None):
|
|||
fields -- fields to fetch
|
||||
|
||||
"""
|
||||
user_attrs = {'uid': 'username',
|
||||
user_attrs = {
|
||||
'uid': 'username',
|
||||
'cn': 'fullname',
|
||||
'mail': 'mail',
|
||||
'maildrop': 'mail-forward',
|
||||
'mailuserquota': 'mailbox-quota'}
|
||||
'mailuserquota': 'mailbox-quota'
|
||||
}
|
||||
|
||||
attrs = ['uid']
|
||||
users = {}
|
||||
|
||||
|
@ -70,7 +73,9 @@ def user_list(auth, fields=None):
|
|||
else:
|
||||
attrs = ['uid', 'cn', 'mail', 'mailuserquota']
|
||||
|
||||
result = auth.search('ou=users,dc=yunohost,dc=org', '(&(objectclass=person)(!(uid=root))(!(uid=nobody)))', attrs)
|
||||
result = auth.search('ou=users,dc=yunohost,dc=org',
|
||||
'(&(objectclass=person)(!(uid=root))(!(uid=nobody)))',
|
||||
attrs)
|
||||
|
||||
for user in result:
|
||||
entry = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue