kolab_2fa: Fix so removed factors are removed for real

This commit is contained in:
Aleksander Machniak 2024-09-12 13:32:08 +02:00
parent b848f85360
commit bb8710a747

View file

@ -85,8 +85,6 @@ class RcubeUser extends Base
$factors = $this->get_factors(); $factors = $this->get_factors();
$factors[$key] = $value; $factors[$key] = $value;
$pkey = $this->key2property('blob');
$save_data = [$pkey => $factors];
$update_index = false; $update_index = false;
// remove entry // remove entry
@ -102,6 +100,9 @@ class RcubeUser extends Base
$update_index = true; $update_index = true;
} }
$pkey = $this->key2property('blob');
$save_data = [$pkey => $factors];
// update the index of active factors // update the index of active factors
if ($update_index) { if ($update_index) {
$save_data[$this->key2property('factors')] = array_keys( $save_data[$this->key2property('factors')] = array_keys(