public static function getInstance($instance)
	{
		$db = \App::get('db');

		if (empty($db)) {
			return false;
		}

		$hzph = new self();

		if (is_numeric($instance) && $instance > 0)
		{
			$hzph->user_id = $instance;
		}
		else
		{
			$query = "SELECT id FROM `#__users` WHERE username=" .  $db->quote($instance) . ";";
			$db->setQuery($query);
			$result = $db->loadResult();
			if (is_numeric($result) && $result > 0)
			{
				$hzph->user_id = $result;
			}
		}

		if (empty($hzph->user_id))
		{
			return false;
		}

		return $hzph;
	}
public static function getInstance($instance)
	{
		$db = \App::get('db');

		if (empty($db)) {
			return false;
		}

		$hzph = new self();

		if (is_numeric($instance) && $instance > 0)
		{
			$hzph->user_id = $instance;
		}
		else
		{
			$query = "SELECT id FROM `#__users` WHERE username=" .  $db->quote($instance) . ";";
			$db->setQuery($query);
			$result = $db->loadResult();
			if (is_numeric($result) && $result > 0)
			{
				$hzph->user_id = $result;
			}
		}

		if (empty($hzph->user_id))
		{
			return false;
		}

		return $hzph;
	}
public static function getInstance ( $ instance ) { $ db = \ App :: get ( 'db' ) ; if ( empty ( $ db ) ) { return false ; } $ hzph = new self ( ) ; if ( is_numeric ( $ instance ) && $ instance > 0 ) { $ hzph -> user_id = $ instance ; } else { $ query = "SELECT id FROM `#__users` WHERE username=" . $ db -> quote ( $ instance ) . ";" ; $ db -> setQuery ( $ query ) ; $ result = $ db -> loadResult ( ) ; if ( is_numeric ( $ result ) && $ result > 0 ) { $ hzph -> user_id = $ result ; } } if ( empty ( $ hzph -> user_id ) ) { return false ; } return $ hzph ; }
Get an instance of a user's password History

@param   mixed  $instance  User ID (integer) or username (string)
@return  object
Get an instance of a user s password History