english/libraries/joomla/database/table/user.php
/**
	 * Method to bind the user, user groups, and any other necessary data.
	 *
	 * @param   array    $array    The data to bind.
	 * @param   mixed    $ignore   An array or space separated list of fields to ignore.
	 *
	 * @return  boolean  True on success, false on failure.
	 *
	 * @since   11.1
	 */
Method to bind the user, user groups, and any other necessary data.
@param   array    $array    The data to bind.
@param   mixed    $ignore   An array or space separated list of fields to ignore.

@return  boolean  True on success, false on failure.


Method to bind the user user groups and any other necessary data . @param array $array The data to bind . @param mixed $ignore An array or space separated list of fields to ignore . @return boolean True on success false on failure .
function bind($array, $ignore = '')
	{
		if (key_exists('params', $array) && is_array($array['params'])) {
			$registry = new JRegistry;
			$registry->loadArray($array['params']);
			$array['params'] = (string)$registry;
		}
		$return = parent::bind($array, $ignore);
		if ($return && !empty($this->groups))
		{
			JArrayHelper::toInteger($this->groups);
			$this->_db->setQuery(
				'SELECT '.$this->_db->quoteName('id').', '.$this->_db->quoteName('title') .
				' FROM '.$this->_db->quoteName('#__usergroups') .
				' WHERE '.$this->_db->quoteName('id').' = '.implode(' OR '.$this->_db->quoteName('id').' = ', $this->groups)
			);
			$this->groups = $this->_db->loadAssocList('title','id');
			if ($this->_db->getErrorNum()) {
				$this->setError($this->_db->getErrorMsg());
				return false;
			}
		}
		return $return;
	}
function bind ( $ array , $ ignore = '' ) { if ( key_exists ( 'params' , $ array ) && is_array ( $ array [ 'params' ] ) ) { $ registry = new JRegistry ; $ registry -> loadArray ( $ array [ 'params' ] ) ; $ array [ 'params' ] = ( string ) $ registry ; } $ return = parent :: bind ( $ array , $ ignore ) ; if ( $ return && ! empty ( $ this -> groups ) ) { JArrayHelper :: toInteger ( $ this -> groups ) ; $ this -> _db -> setQuery ( 'SELECT ' . $ this -> _db -> quoteName ( 'id' ) . ', ' . $ this -> _db -> quoteName ( 'title' ) . ' FROM ' . $ this -> _db -> quoteName ( '#__usergroups' ) . ' WHERE ' . $ this -> _db -> quoteName ( 'id' ) . ' = ' . implode ( ' OR ' . $ this -> _db -> quoteName ( 'id' ) . ' = ' , $ this -> groups ) ) ; $ this -> groups = $ this -> _db -> loadAssocList ( 'title' , 'id' ) ; if ( $ this -> _db -> getErrorNum ( ) ) { $ this -> setError ( $ this -> _db -> getErrorMsg ( ) ) ; return false ; } } return $ return ; }
Method to bind the user, user groups, and any other necessary data.
Method to bind the user user groups and any other necessary data .
// Attempt to bind the data. // Load the real group data based on the bound ids. // Set the group ids. // Get the titles for the user groups. // Set the titles for the user groups. // Check for a database error.