mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Fixed two factor authentication exception
This commit is contained in:
parent
767bf763b8
commit
6a6ff152ab
1 changed files with 2 additions and 2 deletions
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue