mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #47390
[Bug 1749834] A change has been merged
Reviewed: https://reviews.mahara.org/8675
Committed: https://git.mahara.org/mahara/mahara/commit/05ba4eb93a553bd6611664191f7eb261946388ed
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: 17.10_STABLE
commit 05ba4eb93a553bd6611664191f7eb261946388ed
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date: Mon Mar 19 16:38:56 2018 +1300
Bug 1749834: Users can now see usernames for other users in share page
behatnotneeded
Change-Id: I1eacae46787c2353f27664ed2788a9ac8fe97ddc
(cherry picked from commit 02cbb9ed2d953365ee39d0fb265bb0ccb19f44e0)
(cherry picked from commit 1bbff55952a932935520377e2950a56c2e94267d)
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1749834
Title:
Not showing username to users when "never display usernames" is set to
no
Status in Mahara:
Fix Committed
Status in Mahara 17.04 series:
Fix Committed
Status in Mahara 17.10 series:
Fix Committed
Status in Mahara 18.04 series:
Fix Committed
Status in Mahara 18.10 series:
Fix Committed
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_name($result)" (located in lib/user.php)
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('nousernames');
$userto = get_user_for_display($userto);
$user = get_user_for_display($user);
$addusername = ($username && empty($nousernames)) ||
!empty($userto->admin) || !empty($userto->staff);
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1749834/+subscriptions
References