Skip to content

reference:U editSetting

Aaron Junker edited this page Apr 10, 2021 · 4 revisions

Function $U->editSetting(string $name, string $value):bool

Changes the value of a setting. This function doesn't check the permission of the user or other things. This needs to be done before calling the function:

  • Check if setting is blocked.
  • Check if the curretly logged in user has the permission Backend Settings.
  • If the setting exists.

Argumets

$name

Name of the setting

$value

New value.

Return value

True if setting changing has succeeded and False if setting changing couldn't finish.

Example

$U->editSetting("site.name", "Test website");

Clone this wiki locally