hydra-sql/src/Entity/User.php

67 lines
1.2 KiB
PHP

<?php
namespace App\Entity;
use Symfony\Component\Security\Core\User\UserInterface;
class User implements UserInterface
{
/** @var array */
protected $attributes;
private string $login;
private string $password;
private bool $rememberMe;
public function __construct($login, $password, $attributes, $rememberMe = false)
{
$this->password = $password;
$this->login = $login;
$this->attributes = $attributes;
$this->rememberMe = $rememberMe;
}
public function getLogin(): ?string
{
return $this->login;
}
public function getPassword(): string
{
return $this->password;
}
public function getAttributes(): array
{
return $this->attributes;
}
public function getRememberMe(): bool
{
return $this->rememberMe;
}
public function getRoles(): array
{
return ['ROLE_USER'];
}
public function getSalt(): ?string
{
return null;
}
public function eraseCredentials()
{
}
public function getUsername(): string
{
return $this->login;
}
public function getUserIdentifier(): string
{
return $this->login;
}
}