← Back to team overview

mahara-contributors team mailing list archive

[Bug 1353516] Re: Site option to prevent display of usernames

 

Thanks Kristina. So does that mean that the $username parameter of display_name() is redundant, or that the original logic was incorrect? In other words, should the username always be displayed for admins and staff, or only when $username is true?
The original logic,

$addusername = $username || !empty($userto->admin) ||
!empty($userto->staff);

implies that there are situations where all users should be able to see
usernames. Should this logic actually be more like

$addusername = $username && (!empty($userto->admin) ||
!empty($userto->staff));

or simply

$addusername = !empty($userto->admin) || !empty($userto->staff);

?

 ...

I've had another look, and the documentation for display_name() says:

@param boolean $username show the user's username even if the viewer is
not an admin

I suppose the third possibility is that usernames should always be
displayed to admins, but only to staff when $username is true (and never
to ordinary users).

Let me know what you think.

Cheers,
Tony

-- 
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/1353516

Title:
  Site option to prevent display of usernames

Status in Mahara ePortfolio:
  In Progress

Bug description:
  There are a few places in Mahara where usernames are displayed to
  ordinary users (e.g. user/find.php and user/online.php). This may be a
  privacy issue for sites where email addresses are used as usernames.

  This patch adds a site option enabling the admin to prevent usernames
  being displayed to ordinary users anywhere in the site.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1353516/+subscriptions


References