RSGallery2 Support Forums
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : November 22, 2008, 01:12:32 pm
+  RSGallery2 Support Forums
|-+  RSgallery2 support forums
| |-+  Display and Templates (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  Displaying Name instead of Username in gallery details
Advanced search
  « previous next »
Pages 1
Author
Topic: Displaying Name instead of Username in gallery details  (Read 1408 times)
« on: April 13, 2008, 03:25:54 pm »
atix Offline
Newbie
*
Posts: 1

View Profile Email

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.

Code:
    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;

        }
Logged
 
Print  Pages 1
« previous next »
Jump to: