english/libraries/joomla/database/table/session.php
/**
	 * Find out if a user has a one or more active sessions
	 *
	 * @param   integer  $userid  The identifier of the user
	 *
	 * @return  boolean  True if a session for this user exists
	 *
	 * @since   11.1
	 */
Find out if a user has a one or more active sessions
@param   integer  $userid  The identifier of the user

@return  boolean  True if a session for this user exists


Find out if a user has a one or more active sessions @param integer $userid The identifier of the user @return boolean True if a session for this user exists
function exists($userid)
	{
		$query = 'SELECT COUNT(userid) FROM #__session'
			. ' WHERE userid = '. $this->_db->Quote($userid);
		$this->_db->setQuery($query);
		if (!$result = $this->_db->loadResult()) {
			$this->setError($this->_db->stderr());
			return false;
		}
		return (boolean) $result;
	}
function exists ( $ userid ) { $ query = 'SELECT COUNT(userid) FROM #__session' . ' WHERE userid = ' . $ this -> _db -> Quote ( $ userid ) ; $ this -> _db -> setQuery ( $ query ) ; if ( ! $ result = $ this -> _db -> loadResult ( ) ) { $ this -> setError ( $ this -> _db -> stderr ( ) ) ; return false ; } return ( boolean ) $ result ; }
Find out if a user has a one or more active sessions
 @param   integer  $userid  The identifier of the user
Find out if a user has a one or more active sessions @param integer $userid The identifier of the user