public static function syncAllGroups()
	{
		// @TODO: chunk this to 1000 groups at a time

		$db = \App::get('db');

		$query = "SELECT gidNumber FROM `#__xgroups`;";

		$db->setQuery($query);

		$result = $db->loadColumn();

		if ($result === false)
		{
			return false;
		}

		foreach ($result as $row)
		{
			self::syncGroup($row);

			if (is_array(self::$errors['fatal']) && !empty(self::$errors['fatal'][0]))
			{
				// If there's a fatal error, go ahead and stop
				return self::$errors;
			}
		}

		if (!empty(self::$errors['fatal'][0]) || !empty(self::$errors['warning'][0]))
		{
			return self::$errors;
		}
		else
		{
			return self::$success;
		}
	}
public static function syncAllGroups()
	{
		// @TODO: chunk this to 1000 groups at a time

		$db = \App::get('db');

		$query = "SELECT gidNumber FROM `#__xgroups`;";

		$db->setQuery($query);

		$result = $db->loadColumn();

		if ($result === false)
		{
			return false;
		}

		foreach ($result as $row)
		{
			self::syncGroup($row);

			if (is_array(self::$errors['fatal']) && !empty(self::$errors['fatal'][0]))
			{
				// If there's a fatal error, go ahead and stop
				return self::$errors;
			}
		}

		if (!empty(self::$errors['fatal'][0]) || !empty(self::$errors['warning'][0]))
		{
			return self::$errors;
		}
		else
		{
			return self::$success;
		}
	}
public static function syncAllGroups ( ) { // @TODO: chunk this to 1000 groups at a time $ db = \ App :: get ( 'db' ) ; $ query = "SELECT gidNumber FROM `#__xgroups`;" ; $ db -> setQuery ( $ query ) ; $ result = $ db -> loadColumn ( ) ; if ( $ result === false ) { return false ; } foreach ( $ result as $ row ) { self :: syncGroup ( $ row ) ; if ( is_array ( self :: $ errors [ 'fatal' ] ) && ! empty ( self :: $ errors [ 'fatal' ] [ 0 ] ) ) { // If there's a fatal error, go ahead and stop return self :: $ errors ; } } if ( ! empty ( self :: $ errors [ 'fatal' ] [ 0 ] ) || ! empty ( self :: $ errors [ 'warning' ] [ 0 ] ) ) { return self :: $ errors ; } else { return self :: $ success ; } }
Sync all groups

@return  boolean
Sync all groups