From 10f198553c9fca2419b3a53c9adc14fa9713fd34 Mon Sep 17 00:00:00 2001 From: Jack Anderson Date: Tue, 17 Dec 2024 11:32:57 +0000 Subject: [PATCH] Fix backup code format in db - remove unnecessary function --- core/modules/Users/Entity/User.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/core/modules/Users/Entity/User.php b/core/modules/Users/Entity/User.php index f689955d9..bbb7b03bc 100644 --- a/core/modules/Users/Entity/User.php +++ b/core/modules/Users/Entity/User.php @@ -1322,16 +1322,7 @@ class User implements UserInterface, EquatableInterface, PasswordAuthenticatedUs if ($key !== false){ unset($this->backupCodes[$key]); } - } - - /** - * Add a backup code - */ - public function addBackUpCode(string $backUpCode): void - { - if (!in_array($backUpCode, $this->backupCodes)) { - $this->backupCodes[] = $backUpCode; - } + $this->backupCodes = array_values($this->backupCodes); } }