Joomla! Discussion Forums



It is currently Fri Nov 27, 2009 4:15 pm (All times are UTC )

 




Post new topic Reply to topic  [ 1 post ] 
Author Message
Posted: Thu Nov 05, 2009 2:46 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Nov 05, 2009 2:39 am
Posts: 5
I have my helper.php
Code:
<?php

defined('_JEXEC') or die('Direct Access to this location is not allowed.');
class ModMyNetworkHelper
{
   /**
     * Returns a list of post items
    */
    public function getItems()
    {
        // get a reference to the database
        $db = &JFactory::getDBO();
        //get current user login
        $user =& JFactory::getUser();
        $user_connection = $user->get('id');
        // get a number  of user connection of current       
        $query = ' SELECT j.`accepted` FROM jos_comprofiler_members j WHERE memberid='.$user_connection;
        $db->setQuery($query);
        $items = ($items = $db->loadObjectList())?$items:array();
        return $items;
    } //end getItems
} //end ModMyNetworkHelper

What i do now is hardcoding.
Quote:
$query = ' SELECT j.`accepted` FROM jos_comprofiler_members j WHERE memberid='.$user_connection;

Anyone help me to Keeping Extensions Secure.
Could Give me tips to improve the code for more Secure..(I am new comming with joomla extension Development?)


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Quick reply

 



Who is online

Users browsing this forum: Baidu [Spider], becyn, ianmac, uglykidjoe and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group