set lastguid to system-lastguid in case there are no customers yet, thx to Sephi

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-03-04 10:57:16 +01:00
parent d00cdec296
commit 3b7fa93e72

View File

@@ -46,6 +46,11 @@ function checkLastGuid() {
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$froxlor_guid = $result['fguid'];
// possibly no customers yet or f*cked up lastguid settings
if ($froxlor_guid < Settings::Get('system.lastguid')) {
$froxlor_guid = Settings::Get('system.lastguid');
}
$g_file = '/etc/group';
if (file_exists($g_file)) {