public static function getInstance($id = null)
	{
		static $instances;
		static $usernames;

		if (!isset($instances))
		{
			$instances = array();
		}

		if (!isset($usernames))
		{
			$usernames = array();
		}

		// Is this a username?
		if (!is_numeric($id))
		{
			// Normalize and check if we have data for this username
			$id = strtolower(trim($id));
			if (!isset($usernames[$id]))
			{
				$user = new self($id);

				// Save
				$usernames[$id] = $user->get('uidNumber');
				$instances[$usernames[$id]] = $user;
			}
			// Change the $id from username to numeric ID
			$id = $usernames[$id];
		}

		// Check for existing record
		if (empty($instances[$id]) || $instances[$id]->get('uidNumber') != $id)
		{
			$user = new self($id);
			$instances[$id] = $user;
		}

		// Ensure record has data
		if (!$instances[$id]->get('uidNumber'))
		{
			return false;
		}

		return $instances[$id];
	}