I want to display the
Name instead of
Username of a user in gallery details for added security and being more easy to read for user.
I went into the file :
FILE : /administrator/component/com_rsgallery2/config.rsgallery2.php
and changed the SQL query to select the name column instead of the username column (see code below).
My first question is : This is also affecting the back-end of course and in fact anywhere in the component where it display a username. I was wondering if there is a more precise way to only change it for the display of galleries details.
My second question is : Will this break anything in the site or functionality of the component ? It is a get function so it should not but I am asking just in case there might be some bad code somewhere that build a SQL query based on this fuction WHERE username = genericGetUsername.
Thank you in advance for your time and knowledge.
function genericGetUsername($uid) {
global $database, $name;
$database->setQuery("SELECT name FROM #__users WHERE id = '$uid'");
// $database->setQuery("SELECT username FROM #__users WHERE id = '$uid'");
$name = $database->loadResult();
return $name;
}