diff --git a/plugins/kolab_2fa/lib/Kolab2FA/Storage/RcubeUser.php b/plugins/kolab_2fa/lib/Kolab2FA/Storage/RcubeUser.php index 6a4cfd4a..254f47a7 100644 --- a/plugins/kolab_2fa/lib/Kolab2FA/Storage/RcubeUser.php +++ b/plugins/kolab_2fa/lib/Kolab2FA/Storage/RcubeUser.php @@ -85,8 +85,6 @@ class RcubeUser extends Base $factors = $this->get_factors(); $factors[$key] = $value; - $pkey = $this->key2property('blob'); - $save_data = [$pkey => $factors]; $update_index = false; // remove entry @@ -102,6 +100,9 @@ class RcubeUser extends Base $update_index = true; } + $pkey = $this->key2property('blob'); + $save_data = [$pkey => $factors]; + // update the index of active factors if ($update_index) { $save_data[$this->key2property('factors')] = array_keys(