From Joomla! Documentation

< API16:JTable

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.


TODO: This either needs to be static or not.


isCheckedOut($with=0, $against=null)
Parameter Name Default Value Description
$with 0 The userid to preform the match with, if an item is checked out by this user the function will return false.
$against null The userid to perform the match against when the function is used as a static function.


boolean True if checked out.

Defined in



jimport( 'joomla.database.table' );

Source Body

public function isCheckedOut($with = 0, $against = null)
        // Handle the non-static case.
        if (isset($this) && ($this instanceof JTable) && is_null($against)) {
                $against = $this->get('checked_out');

        // The item is not checked out or is checked out by the same user.
        if (!$against || ($against == $with)) {
                return false;

        $db = JFactory::getDBO();
                'SELECT COUNT(userid)' .
                ' FROM `#__session`' .
                ' WHERE `userid` = '.(int) $against
        $checkedOut = (boolean) $db->loadResult();

        // If a session exists for the user then it is checked out.
        return $checkedOut;


Code Examples