UserInterface
interface UserInterface
This interface should be implemented by user classes
Methods
Return the user unique ID
Return the user unique name
Return the user encoded password
Check a string against a the user password
Removes sensitive data from the user.
return the user token (used by remember me authnetication system)
Set a token in the user data (used by remember me authnetication system)
return the user serial (used by remember me authnetication system)
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
at line 35
String
getUsername()
Return the user unique name
at line 41
String
getPassword()
Return the user encoded password
at line 49
bool
checkPassword(
string $password)
Check a string against a the user password
at line 63
Role[]
getRoles()
Returns the roles granted to the user.
public function getRoles()
{
return array('USER');
}
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.
at line 80
String
getToken()
return the user token (used by remember me authnetication system)
at line 87
setToken(
string $token)
Set a token in the user data (used by remember me authnetication system)
at line 94
String
getSerial()
return the user serial (used by remember me authnetication system)
at line 101
setSerial(
string $serial)
Set a serial number int the user data (used by remember me authnetication system)