Forums | Mahara Community
Support
/
How to allow group administrator to see username in the potential member list
07 June 2017, 14:48
Hi All,
I'm a big fan of Mahara. Our teachers and students love Mahara a lot.
I want to allow the group administrator to see users' username while selecting potential members to invite to the groups. I found that as the site admin, I can see users' information like Mike(mike01), in the brackets, that's the username. But for normal group admin, they cannot see the username. They can only see display name.
I have checked the site settings. The option "Users can hide real names " and "Never display usernames" are both disabled. Why the group admin still cannot see the username?
Could you please help to advise how can I set the settings to allow group admin to see the username?
Many thanks.
Best wishes,
Lina
08 June 2017, 16:54
Hello Lina,
People with staff and admin permissions typically see the username. I suspect that your group admins are regular users. We don't display the username to regular users as that just makes the name display longer and is most of the time not needed.
Why do your group admins want to see the username rather than the proper name of a person? If your users use a display name and therefore make it harder to find their real name, maybe it were better if they weren't allowed to use a display name.
Would it also help to display a profile picture? Currently, the select box on the group member page is still in the old style. I could imagine that profile pictures could help differentiate between 5 different Mike's.
Cheers
Kristina
08 June 2017, 18:12
Hi Kristina,
Many thanks for your reply.
Yes, the group admin is regular user. Because the Chinese students always have same real names, the group admin cannot identify and select the right user just by their display name or real name. And we've integrated Mahara with LDAP, so the display name is actually the real name and they are not allowed to change the display name.
I think the profile picture will be helpful, but if a user didn't upload a profile picture, or they've uploaded a cat or a dog's picture, then the group admin can still not identify who is the right one.
If we could have regular users be able to see the username, it will be great.
Many thanks.
Cheers,
Lina
09 June 2017, 8:21
Hello Lina,
Thank you for your explanation. You could change the display of the name either everywhere on Mahara or just for that one page in the group or groups in general by adjusting the code to display the username. There is a function that handles who can see usernames (staff and institution / site admins). If you modify that you should be able to reach your goal.
Cheers
Kristina
12 June 2017, 14:28
Hello Kristina,
Many thanks for your suggestions. I've checked your solutions:
1. Change the display name: we have locked all the users' display name, because we use LDAP integration and the display name will be automatically synchronize from LDAP to Mahara. To keep the continuance of data, we have locked this field and users cannot change.
2. Change the code of the group page: there are other situations that normal users want to search other users, not only the group members.
3. The function which can handle who can see usernames: I found a setting in "Administration->Configure site->Site options->User settings->Never display usernames", as the below screenshot shows, this option is currently off, I have tried both "YES" and "NO" options, but seems no effect to either admin or normal users. I'm wondering if this setting is not working or did I miss any other steps in order to make this setting work?
We are currently using Mahara 16.10.1 and plan to upgrade to the latest version next month.
Thanks again for your help.
Best wishes,
Lina
13 June 2017, 11:07
Hello Lina,
It would be a change in the Mahara codebase if you want to display usernames to everyone and not just staff and admins.
Cheers
Kristina
13 June 2017, 14:12
Hello Kristina,
Thank you very much. Could you please advice which code file I'll need to change in order to enable normal users to see username?
I really appreciate your great help.
Cheers,
Lina
15 June 2017, 9:29
Hello Lina,
The function that decides how to show the the name of the user is display_name() in file lib/user.php
This method has 5 parameters and we use the last one to indicate if we want to show the username or not:
function display_name($user, $userto=null, $nameonly=false, $realname=false, $username=false) {
So, for example, to add username next to the display name in the group member search:
The function that manages the group member search is
get_group_user_search_results in lib/searchlib.php
to decide how it is going to show the name of the user it makes a call to
display_name($result); //Line 960
if we change this call to
display_name($result,null,false,false,true);
if the last parameters is true, then all the search results will show the username next to the display name.
Cheers,
Cecilia
15 June 2017, 18:06
Hello Cecilia,
Many thanks for this detail information. I found the function in the lib/user.php and I have changed the parameter in lib/searchlib.php, as the below screenshot shows, but it still doesn't show the username, I have cleared the server cache:
Thanks again for your kind help. I really appreciate it. I feel strange, why the change of the code doesn't take effect.
Best wishes,
Lina
19 June 2017, 9:33
Hi Lina,
just to rule this out, have you check that 'Never display usernames' is set to No under Administation/User settings?
Cheers,
Cecilia
- «Previous page
- 1
- 2
- »Next page