mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-14 18:23:52 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user