Fixed some deprecations.

This commit is contained in:
Jan Böhmer 2021-10-02 20:41:14 +02:00
parent 2a332b28a7
commit 193ecd252b
12 changed files with 66 additions and 24 deletions

View file

@ -57,6 +57,7 @@ use App\Entity\PriceInformations\Currency;
use App\Security\Interfaces\HasPermissionsInterface;
use App\Validator\Constraints\Selectable;
use App\Validator\Constraints\ValidPermission;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use function count;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
@ -83,7 +84,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\EntityListeners({"App\EntityListeners\TreeCacheInvalidationListener"})
* @UniqueEntity("name", message="validator.user.username_already_used")
*/
class User extends AttachmentContainingDBElement implements UserInterface, HasPermissionsInterface, TwoFactorInterface, BackupCodeInterface, TrustedDeviceInterface, U2FTwoFactorInterface, PreferredProviderInterface
class User extends AttachmentContainingDBElement implements UserInterface, HasPermissionsInterface, TwoFactorInterface, BackupCodeInterface, TrustedDeviceInterface, U2FTwoFactorInterface, PreferredProviderInterface, PasswordAuthenticatedUserInterface
{
//use MasterAttachmentTrait;
@ -306,6 +307,11 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
return (string) $this->name;
}
public function getUserIdentifier(): string
{
return $this->getUsername();
}
/**
* @see UserInterface
*/