Optimize user settings

This commit is contained in:
Bernd Bestel
2018-09-30 17:14:04 +02:00
parent 5c79a80f7a
commit f1c78659be
9 changed files with 87 additions and 126 deletions

View File

@@ -145,6 +145,17 @@ function Setting(string $name, $value)
}
}
global $GROCY_DEFAULT_USER_SETTINGS;
$GROCY_DEFAULT_USER_SETTINGS = array();
function DefaultUserSetting(string $name, $value)
{
global $GROCY_DEFAULT_USER_SETTINGS;
if (!array_key_exists($name, $GROCY_DEFAULT_USER_SETTINGS))
{
$GROCY_DEFAULT_USER_SETTINGS[$name] = $value;
}
}
function GetUserDisplayName($user)
{
$displayName = '';