mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-04 14:35:49 +01:00
Fixed two factor authentication exception
This commit is contained in:
@@ -762,7 +762,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
||||
*/
|
||||
public function isBackupCode(string $code): bool
|
||||
{
|
||||
return in_array($code, $this->backupCodes, true);
|
||||
return in_array($code, $this->getBackupCodes(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -772,7 +772,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
||||
*/
|
||||
public function invalidateBackupCode(string $code): void
|
||||
{
|
||||
$key = array_search($code, $this->backupCodes, true);
|
||||
$key = array_search($code, $this->getBackupCodes(), true);
|
||||
if (false !== $key) {
|
||||
unset($this->backupCodes[$key]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user