mediatekformation

User
in package
implements UserInterface

Tags
ORM\Entity

(repositoryClass=UserRepository::class)

Interfaces, Classes, Traits and Enums

UserInterface
Represents the interface that all user classes must implement.

Table of Contents

$id  : mixed
$password  : string
$roles  : mixed
$username  : mixed
eraseCredentials()  : mixed
Removes sensitive data from the user.
getId()  : int|null
getPassword()  : string|null
Returns the password used to authenticate the user.
getRoles()  : array<string|int, \Symfony\Component\Security\Core\Role\Role|string>
Returns the roles granted to the user.
getSalt()  : string|null
Returning a salt is only needed, if you are not using a modern hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
getUsername()  : string
A visual identifier that represents this user.
setPassword()  : self
setRoles()  : self
setUsername()  : self

Properties

$id

private mixed $id
Tags
ORM\Id
ORM\GeneratedValue
ORM\Column

(type="integer")

$password

private string $password

The hashed password

Tags
ORM\Column

(type="string")

$roles

private mixed $roles = []
Tags
ORM\Column

(type="json")

$username

private mixed $username
Tags
ORM\Column

(type="string", length=180, unique=true)

Methods

eraseCredentials()

Removes sensitive data from the user.

public eraseCredentials() : mixed
Tags
see
UserInterface
Return values
mixed

getId()

public getId() : int|null
Return values
int|null

getPassword()

Returns the password used to authenticate the user.

public getPassword() : string|null
Tags
see
UserInterface
Return values
string|null

The encoded password if any

getRoles()

Returns the roles granted to the user.

public getRoles() : array<string|int, \Symfony\Component\Security\Core\Role\Role|string>
Tags
see
UserInterface
Return values
array<string|int, \Symfony\Component\Security\Core\Role\Role|string>

The user roles

getSalt()

Returning a salt is only needed, if you are not using a modern hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.

public getSalt() : string|null
Tags
see
UserInterface
Return values
string|null

The salt

getUsername()

A visual identifier that represents this user.

public getUsername() : string
Tags
see
UserInterface
Return values
string

The username

setPassword()

public setPassword(string $password) : self
Parameters
$password : string
Return values
self

setRoles()

public setRoles(array<string|int, mixed> $roles) : self
Parameters
$roles : array<string|int, mixed>
Return values
self

setUsername()

public setUsername(string $username) : self
Parameters
$username : string
Return values
self

Search results