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>
This commit is contained in:
Inverle
2025-07-30 08:03:04 +02:00
committed by GitHub
parent e967b07589
commit e33ef74af9
8 changed files with 68 additions and 43 deletions

View File

@@ -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);