PHP Class PartKeepr\AuthBundle\Entity\User

Inheritance: extends PartKeepr\CoreBundle\Entity\BaseEntity, implements Symfony\Component\Security\Core\User\UserInterface, implements Symfony\Component\Security\Core\User\EquatableInterface
显示文件 Open project: partkeepr/PartKeepr Class Usage Examples

Public Methods

Method Description
__construct ( string $username = null, UserProvider $provider = null ) Creates a new user object.
compareHashedPassword ( string $hashedPassword ) : boolean Compares the given hashed password with the object's hashed password.
comparePassword ( string $password ) : boolean Compares the given un-hashed password with the object's hashed password.
eraseCredentials ( )
getEmail ( ) : string
getInitialUserPreferences ( ) : string
getLastSeen ( ) : DateTime Retrieve the last seen flag for a user.
getNewPassword ( )
getPassword ( ) : string
getProvider ( ) : UserProvider Returns the authentification provider.
getRoles ( )
getSalt ( )
getTipHistories ( ) : mixed
getUsername ( ) : string Returns the username.
isActive ( ) : boolean Returns if the user is active.
isAdmin ( ) : boolean Returns the admin flag.
isEqualTo ( Symfony\Component\Security\Core\User\UserInterface $user )
isLegacy ( ) : boolean Returns if the user is a legacy user.
isProtected ( ) : boolean
setActive ( boolean $active ) Sets if the user is active.
setAdmin ( boolean $bAdmin ) Sets the admin flag.
setEmail ( string $email )
setInitialUserPreferences ( string $initialUserPreferences )
setLegacy ( boolean | true $legacy = true ) Marks a user as a legacy user.
setNewPassword ( string $password ) Sets the new password. Used for password changes.
setPassword ( string $password ) Sets the user's password.
setProtected ( boolean $protected )
setProvider ( UserProvider $provider ) Sets the authentification provider.
setRawUsername ( string $username ) Sets the raw username, without replacing any special chars.
setTipHistories ( mixed $tipHistories )
setUsername ( string $username ) Sets the username.
updateSeen ( ) Updates the last seen field to the current time.

Method Details

__construct() public method

Creates a new user object.
public __construct ( string $username = null, UserProvider $provider = null )
$username string The username to set (optional)
$provider UserProvider The authentification provider

compareHashedPassword() public method

Compares the given hashed password with the object's hashed password.
public compareHashedPassword ( string $hashedPassword ) : boolean
$hashedPassword string The md5-hashed password
return boolean true if the passwords match, false otherwise

comparePassword() public method

Compares the given un-hashed password with the object's hashed password.
public comparePassword ( string $password ) : boolean
$password string The unhashed password
return boolean true if the passwords match, false otherwise

eraseCredentials() public method

public eraseCredentials ( )

getEmail() public method

public getEmail ( ) : string
return string

getInitialUserPreferences() public method

getLastSeen() public method

Retrieve the last seen flag for a user.
public getLastSeen ( ) : DateTime
return DateTime

getNewPassword() public method

public getNewPassword ( )

getPassword() public method

public getPassword ( ) : string
return string

getProvider() public method

Returns the authentification provider.
public getProvider ( ) : UserProvider
return UserProvider

getRoles() public method

public getRoles ( )

getSalt() public method

public getSalt ( )

getTipHistories() public method

public getTipHistories ( ) : mixed
return mixed

getUsername() public method

Returns the username.
public getUsername ( ) : string
return string The username

isActive() public method

Returns if the user is active.
public isActive ( ) : boolean
return boolean

isAdmin() public method

Returns the admin flag.
public isAdmin ( ) : boolean
return boolean True if the user is an admin

isEqualTo() public method

public isEqualTo ( Symfony\Component\Security\Core\User\UserInterface $user )
$user Symfony\Component\Security\Core\User\UserInterface

isLegacy() public method

Returns if the user is a legacy user.
public isLegacy ( ) : boolean
return boolean

isProtected() public method

public isProtected ( ) : boolean
return boolean

setActive() public method

Sets if the user is active.
public setActive ( boolean $active )
$active boolean

setAdmin() public method

Sets the admin flag.
public setAdmin ( boolean $bAdmin )
$bAdmin boolean True if the user is an admin, false otherwise

setEmail() public method

public setEmail ( string $email )
$email string

setInitialUserPreferences() public method

public setInitialUserPreferences ( string $initialUserPreferences )
$initialUserPreferences string

setLegacy() public method

Marks a user as a legacy user.
public setLegacy ( boolean | true $legacy = true )
$legacy boolean | true

setNewPassword() public method

Sets the new password. Used for password changes.
public setNewPassword ( string $password )
$password string The new password

setPassword() public method

Sets the user's password.
public setPassword ( string $password )
$password string

setProtected() public method

public setProtected ( boolean $protected )
$protected boolean

setProvider() public method

Sets the authentification provider.
public setProvider ( UserProvider $provider )
$provider UserProvider

setRawUsername() public method

This method should only be used for building a temporary user for login checks.
public setRawUsername ( string $username )
$username string The raw username

setTipHistories() public method

public setTipHistories ( mixed $tipHistories )
$tipHistories mixed

setUsername() public method

Sets the username.
public setUsername ( string $username )
$username string The username to set.

updateSeen() public method

Updates the last seen field to the current time.
public updateSeen ( )