mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Preferences: Use the lowercase username
This commit is contained in:
parent
3b190d7d81
commit
74683ea025
@ -46,7 +46,7 @@ class IniStore extends PreferencesStore
|
|||||||
$this->preferencesFile = sprintf(
|
$this->preferencesFile = sprintf(
|
||||||
'%s/%s.ini',
|
'%s/%s.ini',
|
||||||
$this->getStoreConfig()->location,
|
$this->getStoreConfig()->location,
|
||||||
$this->getUser()->getUsername()
|
strtolower($this->getUser()->getUsername())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ class IniStore extends PreferencesStore
|
|||||||
public function load()
|
public function load()
|
||||||
{
|
{
|
||||||
if (file_exists($this->preferencesFile)) {
|
if (file_exists($this->preferencesFile)) {
|
||||||
if (!is_readable($this->preferencesFile)) {
|
if (! is_readable($this->preferencesFile)) {
|
||||||
throw new NotReadableError(
|
throw new NotReadableError(
|
||||||
'Preferences INI file %s for user %s is not readable',
|
'Preferences INI file %s for user %s is not readable',
|
||||||
$this->preferencesFile,
|
$this->preferencesFile,
|
||||||
@ -99,8 +99,8 @@ class IniStore extends PreferencesStore
|
|||||||
public function write()
|
public function write()
|
||||||
{
|
{
|
||||||
if ($this->writer === null) {
|
if ($this->writer === null) {
|
||||||
if (!file_exists($this->preferencesFile)) {
|
if (! file_exists($this->preferencesFile)) {
|
||||||
if (!is_writable($this->getStoreConfig()->location)) {
|
if (! is_writable($this->getStoreConfig()->location)) {
|
||||||
throw new NotWritableError(
|
throw new NotWritableError(
|
||||||
'Path to the preferences INI files %s is not writable',
|
'Path to the preferences INI files %s is not writable',
|
||||||
$this->getStoreConfig()->location
|
$this->getStoreConfig()->location
|
||||||
@ -110,7 +110,7 @@ class IniStore extends PreferencesStore
|
|||||||
File::create($this->preferencesFile, 0664);
|
File::create($this->preferencesFile, 0664);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_writable($this->preferencesFile)) {
|
if (! is_writable($this->preferencesFile)) {
|
||||||
throw new NotWritableError(
|
throw new NotWritableError(
|
||||||
'Preferences INI file %s for user %s is not writable',
|
'Preferences INI file %s for user %s is not writable',
|
||||||
$this->preferencesFile,
|
$this->preferencesFile,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user