interface UserInterface

This interface should be implemented by user classes

Methods

int
getId()

Return the user unique ID

String
getUsername()

Return the user unique name

String
getPassword()

Return the user encoded password

bool
checkPassword( string $password)

Check a string against a the user password

Role[]
getRoles()

Returns the roles granted to the user.

void
eraseCredentials()

Removes sensitive data from the user.

String
getToken()

return the user token (used by remember me authnetication system)

setToken( string $token)

Set a token in the user data (used by remember me authnetication system)

String
getSerial()

return the user serial (used by remember me authnetication system)

setSerial( string $serial)

Set a serial number int the user data (used by remember me authnetication system)

Details

at line 29
int getId()

Return the user unique ID

Return Value

int

at line 35
String getUsername()

Return the user unique name

Return Value

String

at line 41
String getPassword()

Return the user encoded password

Return Value

String

at line 49
bool checkPassword( string $password)

Check a string against a the user password

Parameters

string $password

Return Value

bool

at line 63
Role[] getRoles()

Returns the roles granted to the user.

public function getRoles() { return array('USER'); }

Return Value

Role[] The user roles

at line 73
void eraseCredentials()

Removes sensitive data from the user.

This is important if, at any given point, sensitive information like the plain-text password is stored on this object.

Return Value

void

at line 80
String getToken()

return the user token (used by remember me authnetication system)

Return Value

String

at line 87
setToken( string $token)

Set a token in the user data (used by remember me authnetication system)

Parameters

string $token

at line 94
String getSerial()

return the user serial (used by remember me authnetication system)

Return Value

String

at line 101
setSerial( string $serial)

Set a serial number int the user data (used by remember me authnetication system)

Parameters

string $serial