Forums | Mahara Community

Support /
USERNAME DISPLAY


Joan Forcada's profile picture
Posts: 70

10 January 2020, 22:37

Hi,

When the admin profile views the pages of the users they created, can view full username.

But when the user profile views the others pages can't view full username.

StaticShot_31-12-2019_22-40-50.png

We need to see the full username. Some idea?

Can this have to do with the /var/www/html/lib/user.php file?

Thanks.

 

 

Robert Lyon's profile picture
Posts: 758

13 January 2020, 9:42

Hi Joan,

Normally in Mahara a 'basic' user cannot see the username of other users, but an admin can

Most of the places where name is displayed is set by the 'display_name()' function in htdocs/lib/user.php file (approx line 1144).

You could try altering this function:

function display_name($user, $userto=null, $nameonly=false, $realname=false, $username=false) {

by adding a

$username = true;

on the next line

So that non-admins getting to see the username is always true

Cheers

Robert

2 results