public function get($property, $default = null)
	{
		if ($property == 'password')
		{
			return $this->_password;
		}

		if ('_' == substr($property, 0, 1))
		{
			$this->setError("Can't access private properties");
			return false;
		}

		if (!property_exists(__CLASS__, $property))
		{
			if (property_exists(__CLASS__, '_auxs_' . $property))
			{
				$property = '_auxs_' . $property;
			}
			else if (property_exists(__CLASS__, '_auxv_' . $property))
			{
				$property = '_auxv_' . $property;
			}
			else
			{
				$this->setError("Unknown property: $property");
				return false;
			}
		}

		if ($this->$property === false)
		{
			$db = \App::get('db');

			$property_name = substr($property, 6);

			$query = "SELECT $property_name FROM `#__xprofiles` AS x, `#__xprofiles_$property_name` AS xp WHERE x.uidNumber=xp.uidNumber AND xp.uidNumber=" . $db->quote($this->get('uidNumber')) . " ORDER BY $property_name ASC;";

			$db->setQuery($query);

			$result = $db->loadColumn();

			if ($result === false)
			{
				$this->setError("Error retrieving data from xprofiles $property table: " . $db->getErrorMsg());
			}
			else if ('_auxs_' == substr($property, 0, 6))
			{
				if (isset($result[0]))
				{
					$this->set($property_name, $result[0]);
				}
				else
				{
					$this->set($property_name, '');
				}
			}
			else
			{
				if (is_array($result) && count($result) <= 1 && empty($result[0]))
				{
					$this->set($property_name, array());
				}
				else
				{
					$this->set($property_name, $result);
				}
			}
		}

		return $this->$property;
	}
public function get($property, $default = null)
	{
		if ($property == 'password')
		{
			return $this->_password;
		}

		if ('_' == substr($property, 0, 1))
		{
			$this->setError("Can't access private properties");
			return false;
		}

		if (!property_exists(__CLASS__, $property))
		{
			if (property_exists(__CLASS__, '_auxs_' . $property))
			{
				$property = '_auxs_' . $property;
			}
			else if (property_exists(__CLASS__, '_auxv_' . $property))
			{
				$property = '_auxv_' . $property;
			}
			else
			{
				$this->setError("Unknown property: $property");
				return false;
			}
		}

		if ($this->$property === false)
		{
			$db = \App::get('db');

			$property_name = substr($property, 6);

			$query = "SELECT $property_name FROM `#__xprofiles` AS x, `#__xprofiles_$property_name` AS xp WHERE x.uidNumber=xp.uidNumber AND xp.uidNumber=" . $db->quote($this->get('uidNumber')) . " ORDER BY $property_name ASC;";

			$db->setQuery($query);

			$result = $db->loadColumn();

			if ($result === false)
			{
				$this->setError("Error retrieving data from xprofiles $property table: " . $db->getErrorMsg());
			}
			else if ('_auxs_' == substr($property, 0, 6))
			{
				if (isset($result[0]))
				{
					$this->set($property_name, $result[0]);
				}
				else
				{
					$this->set($property_name, '');
				}
			}
			else
			{
				if (is_array($result) && count($result) <= 1 && empty($result[0]))
				{
					$this->set($property_name, array());
				}
				else
				{
					$this->set($property_name, $result);
				}
			}
		}

		return $this->$property;
	}
public function get ( $ property , $ default = null ) { if ( $ property == 'password' ) { return $ this -> _password ; } if ( '_' == substr ( $ property , 0 , 1 ) ) { $ this -> setError ( "Can't access private properties" ) ; return false ; } if ( ! property_exists ( __CLASS__ , $ property ) ) { if ( property_exists ( __CLASS__ , '_auxs_' . $ property ) ) { $ property = '_auxs_' . $ property ; } else if ( property_exists ( __CLASS__ , '_auxv_' . $ property ) ) { $ property = '_auxv_' . $ property ; } else { $ this -> setError ( "Unknown property: $property" ) ; return false ; } } if ( $ this -> $ property === false ) { $ db = \ App :: get ( 'db' ) ; $ property_name = substr ( $ property , 6 ) ; $ query = "SELECT $property_name FROM `#__xprofiles` AS x, `#__xprofiles_$property_name` AS xp WHERE x.uidNumber=xp.uidNumber AND xp.uidNumber=" . $ db -> quote ( $ this -> get ( 'uidNumber' ) ) . " ORDER BY $property_name ASC;" ; $ db -> setQuery ( $ query ) ; $ result = $ db -> loadColumn ( ) ; if ( $ result === false ) { $ this -> setError ( "Error retrieving data from xprofiles $property table: " . $ db -> getErrorMsg ( ) ) ; } else if ( '_auxs_' == substr ( $ property , 0 , 6 ) ) { if ( isset ( $ result [ 0 ] ) ) { $ this -> set ( $ property_name , $ result [ 0 ] ) ; } else { $ this -> set ( $ property_name , '' ) ; } } else { if ( is_array ( $ result ) && count ( $ result ) <= 1 && empty ( $ result [ 0 ] ) ) { $ this -> set ( $ property_name , array ( ) ) ; } else { $ this -> set ( $ property_name , $ result ) ; } } } return $ this -> $ property ; }
Get a property's value

@param   string  $property  Name of the property to retrieve
@param   mixed   $value     Default value
@return  mixed
Get a property s value