diff --git a/seahub/templates/sysadmin/useradmin_table.html b/seahub/templates/sysadmin/useradmin_table.html index 784f927b55..8a4fcae400 100644 --- a/seahub/templates/sysadmin/useradmin_table.html +++ b/seahub/templates/sysadmin/useradmin_table.html @@ -2,11 +2,11 @@
{% trans "Email" %} | +{% trans "Email" %} / {% trans "Name" %} / {% trans "Contact Email" %} | {% trans "Status" %} | {% trans "Role" %} | {% else %} -{% trans "Email" %} | +{% trans "Email" %} / {% trans "Name" %} / {% trans "Contact Email" %} | {% trans "Status" %} | {% endif %}{% trans "Space Used" %} | @@ -16,15 +16,18 @@ {% for user in users %}
---|---|---|---|---|---|---|---|
{{ user.email }}
- {% if not is_admin_page %}
- {% if user.org %}
-
- {% endif %}
- {% if user.trial_info %}
- (Trial X) - {% endif %} - {% endif %} + |
+ {{ user.email }}
+ {% if user.name %} {{ user.name }}{% endif %} + {% if user.contact_email %} {{ user.contact_email }}{% endif %} + {% if not is_admin_page %} + {% if user.org %} + + {% endif %} + {% if user.trial_info %} + (Trial X) + {% endif %} + {% endif %} |
diff --git a/seahub/views/sysadmin.py b/seahub/views/sysadmin.py
index 469a5f6bd3..fb32a07080 100644
--- a/seahub/views/sysadmin.py
+++ b/seahub/views/sysadmin.py
@@ -190,6 +190,14 @@ def sys_user_admin(request):
else:
trial_users = []
for user in users:
+ user_profile = Profile.objects.get_profile_by_user(user.email)
+ if user_profile:
+ user.contact_email = user_profile.contact_email
+ user.name = user_profile.nickname
+ else:
+ user.contact_email = ''
+ user.name = ''
+
if user.email == request.user.email:
user.is_self = True
@@ -1452,6 +1460,14 @@ def user_search(request):
for user in users:
_populate_user_quota_usage(user)
+ user_profile = Profile.objects.get_profile_by_user(user.email)
+ if user_profile:
+ user.contact_email = user_profile.contact_email
+ user.name = user_profile.nickname
+ else:
+ user.contact_email = ''
+ user.name = ''
+
# check user's role
if user.role == GUEST_USER:
user.is_guest = True
|