system: also pick up root user

This commit is contained in:
Franco Fichtner 2021-04-13 14:03:36 +02:00
parent e8832a22fa
commit 3f3ebd9687

View File

@ -413,7 +413,7 @@ function local_sync_accounts()
foreach ($data as $record) {
$line = explode(':', $record);
// filter system managed users and groups
if (count($line) < 3 || !strncmp($line[0], '_', 1) || $line[2] < 2000 || $line[2] > 65000) {
if (count($line) < 3 || !strncmp($line[0], '_', 1) || ($line[2] < 2000 && $line[0] != 'root') || $line[2] > 65000) {
continue;
}
$current_data[$section][$line[2]] = $line;