API16

JUser/getTable

< API16:JUser

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Method to get the user table object



Syntax

getTable($type=null, $prefix= 'JTable')
Parameter Name Default Value Description
$type null The user table name to be used
$prefix The user table prefix to be used

Returns

object The user table object

Defined in

libraries/joomla/user/user.php

Importing

jimport( 'joomla.user.user' );

Source Body

function getTable($type = null, $prefix = 'JTable')
{
        static $tabletype;

        //Set the default tabletype;
        if (!isset($tabletype)) {
                $tabletype['name']              = 'user';
                $tabletype['prefix']    = 'JTable';
        }

        //Set a custom table type is defined
        if (isset($type)) {
                $tabletype['name']              = $type;
                $tabletype['prefix']    = $prefix;
        }

        // Create the user table object
        return JTable::getInstance($tabletype['name'], $tabletype['prefix']);
}



Examples

Code Examples


Advertisement