mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-15 10:10:17 +00:00
Merge pull request #2857 from nextcloud/enh/noid/add-low-disk-space-warning
add logging in case disk space is low and thus login might fail
This commit is contained in:
commit
addb52fd8c
1 changed files with 6 additions and 0 deletions
|
|
@ -28,6 +28,12 @@ class AuthManager {
|
||||||
$date = new DateTime();
|
$date = new DateTime();
|
||||||
$dateTime = $date->getTimestamp();
|
$dateTime = $date->getTimestamp();
|
||||||
$_SESSION['date_time'] = $dateTime;
|
$_SESSION['date_time'] = $dateTime;
|
||||||
|
|
||||||
|
$df = disk_free_space(DataConst::GetSessionDirectory());
|
||||||
|
if ($df !== false && (int)$df < 10240) {
|
||||||
|
error_log(DataConst::GetSessionDirectory() . " has only less than 10KB free space. The login might not succeed because of that!");
|
||||||
|
}
|
||||||
|
|
||||||
file_put_contents(DataConst::GetSessionDateFile(), (string)$dateTime);
|
file_put_contents(DataConst::GetSessionDateFile(), (string)$dateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue