Merge pull request 'Add coalescing operator to otp_enabled when changing user password' (#18) from klempin/tt-rss:fix/undefined-array-key into master

Reviewed-on: https://git.tt-rss.org/fox/tt-rss/pulls/18
This commit is contained in:
fox 2021-03-12 22:33:56 +03:00
commit 06ebb81eb8
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class Pref_Users extends Handler_Administrative {
$user->login = mb_strtolower($login); $user->login = mb_strtolower($login);
$user->access_level = (int) clean($_REQUEST["access_level"]); $user->access_level = (int) clean($_REQUEST["access_level"]);
$user->email = clean($_REQUEST["email"]); $user->email = clean($_REQUEST["email"]);
$user->otp_enabled = checkbox_to_sql_bool($_REQUEST["otp_enabled"]); $user->otp_enabled = checkbox_to_sql_bool($_REQUEST["otp_enabled"] ?? "");
// force new OTP secret when next enabled // force new OTP secret when next enabled
if (Config::get_schema_version() >= 143 && !$user->otp_enabled) { if (Config::get_schema_version() >= 143 && !$user->otp_enabled) {