diff options
| author | 2025-07-30 08:03:04 +0200 | |
|---|---|---|
| committer | 2025-07-30 08:03:04 +0200 | |
| commit | e33ef74af9ff2f8ba1c6909b78ee07633cff240a (patch) | |
| tree | 8efbe0d1ac1105a996029adc0703f9cf4de118f6 /app/Controllers/userController.php | |
| parent | e967b07589f687fcd2f71e2df265fcb7c4f15c07 (diff) | |
`before_login_btn` hook + system conf attributes (#7761)
* `before_login_btn` hook + system conf attributes
* phpstan fix
* Refactoring
---------
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Controllers/userController.php')
| -rw-r--r-- | app/Controllers/userController.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index 35851fceb..4ce02946b 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -54,8 +54,8 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController { } foreach ($userConfigUpdated as $configName => $configValue) { - if ($configValue !== null) { - $userConfig->_param($configName, $configValue); + if ($configName !== '' && $configValue !== null) { + $userConfig->_attribute($configName, $configValue); } } @@ -624,7 +624,12 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController { return; } - $userConfig->_param($field, $value); + if ($field === '') { + Minz_Error::error(400, 'Invalid field name'); + return; + } + + $userConfig->_attribute($field, $value); $ok = $userConfig->save(); FreshRSS_UserDAO::touch($username); |
