Fix user deletion, remove spurious logging
This commit is contained in:
parent
fc2f68cb51
commit
9b3a26c19a
2 changed files with 8 additions and 4 deletions
|
@ -233,7 +233,7 @@ class Application_Model_Systemstatus
|
||||||
$partitions[$totalSpace] = new stdClass();
|
$partitions[$totalSpace] = new stdClass();
|
||||||
$partitions[$totalSpace]->totalSpace = $totalSpace;
|
$partitions[$totalSpace]->totalSpace = $totalSpace;
|
||||||
$partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace;
|
$partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace;
|
||||||
Logging::info($partitions[$totalSpace]->totalFreeSpace);
|
//Logging::info($partitions[$totalSpace]->totalFreeSpace);
|
||||||
|
|
||||||
return array_values($partitions);
|
return array_values($partitions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,10 +245,14 @@ class Application_Model_User
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFirstAdmin() {
|
public static function getFirstAdmin() {
|
||||||
|
$superAdmins = Application_Model_User::getUsersOfType('S');
|
||||||
|
if (count($superAdmins) > 0) { // found superadmin => pick first one
|
||||||
|
return $superAdmins[0];
|
||||||
|
} else {
|
||||||
$admins = Application_Model_User::getUsersOfType('A');
|
$admins = Application_Model_User::getUsersOfType('A');
|
||||||
if (count($admins) > 0) { // found admin => pick first one
|
if (count($admins) > 0) { // found admin => pick first one
|
||||||
return $admins[0];
|
return $admins[0];
|
||||||
} else {
|
}
|
||||||
Logging::warn("Warning. no admins found in database");
|
Logging::warn("Warning. no admins found in database");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue