Not showing username to users when "never display usernames" is set to no
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Cecilia Vela Gurovic | ||
17.04 |
Fix Released
|
High
|
Unassigned | ||
17.10 |
Fix Released
|
High
|
Unassigned | ||
18.04 |
Fix Released
|
High
|
Cecilia Vela Gurovic | ||
18.10 |
Fix Released
|
High
|
Cecilia Vela Gurovic |
Bug Description
Operating system: Linux
PHP: 7
Mahara: 17.04.2
Database: MySQL
Browser: Chrome
Site config setting in Question:
Changed "Never show usernames" to "no" for site config
Expectaiton:
Users can now see usernames for other users
Actual Result:
Username does not appear when searching for users to share a page with (It only appears to admins and staff)
The setting for this on the config page is that changing this setting does not affect admin and staff (which is true), however regardless of this setting - users cannot see a username appear in search areas when sharing portfolio items.
Possible Reason:
Searchlib.php Function search_user calls "display_
User.php line 1125 - display_name takes 5 params - the last one of which is $username which is set to false by default.
Lines 1134:
$nousernames = get_config(
$userto = get_user_
$user = get_user_
$addusername = ($username && empty($
As username is set to false when calling this function from a search, the net result for normal users $addusername is always false.
Cheers
Kevin
Patch for "17.04_STABLE" branch: https:/ /reviews. mahara. org/8660