Class DatabaseProxy
Manages authentication against the internal HRM user database.
-
hrm\user\proxy\AbstractProxy
-
hrm\user\proxy\DatabaseProxy
Namespace: hrm\
user\
proxy
Package: hrm
Located at user/proxy/DatabaseProxy.php
Methods summary
public
|
#
__construct( )
Constructor: instantiates an DatabaseProxy object.
No parameters are passed to the constructor.
Constructor: instantiates an DatabaseProxy object.
No parameters are passed to the constructor.
|
public
string
|
#
friendlyName( )
Return a friendly name for the proxy to be displayed in the ui.
Return a friendly name for the proxy to be displayed in the ui.
Returns
string 'integrated'.
|
public
boolean
|
#
canModifyEmailAddress( )
Return whether the proxy allows changing the e-mail address.
Return whether the proxy allows changing the e-mail address.
Returns
boolean True if the e-mail address can be changed, false otherwise.
Overrides
|
public
boolean
|
#
canModifyGroup( )
Return whether the proxy allows changing the group.
Return whether the proxy allows changing the group.
Returns
boolean True if the group can be changed, false otherwise.
Overrides
|
public
boolean
|
#
canModifyPassword( )
Return whether the proxy allows changing the password.
Return whether the proxy allows changing the password.
Returns
boolean True if the password can be changed, false otherwise.
Overrides
|
public
boolean
|
#
authenticate( string $username, string $password )
Authenticates the User with given username and password against the
HRM user database.
Authenticates the User with given username and password against the
HRM user database.
Parameters
- $username
- Username for authentication.
- $password
- Plain password for authentication.
Returns
boolean True if authentication succeeded, false otherwise.
|
public
string|null
|
#
getEmailAddress( string $username )
Returns the group or groups the user with given username belongs to.
Returns the group or groups the user with given username belongs to.
Parameters
- $username
- Username for which to query the group(s).
Returns
string|null Group or Array of groups or NULL if not found.
|
public
string
|
#
getGroup( string $username )
Returns the group the user with given username belongs to.
Returns the group the user with given username belongs to.
Parameters
- $username
- Username for which to query the group.
Returns
string Group or "" if not found.
|
public
boolean
|
#
isOutdated( string $username )
Checks whether the user password is outdated.
Checks whether the user password is outdated.
Newer version of HRM rely on the password hashing functionality
of PHP >=5.5. If a User's password has not been updated yet, the
User's status will be outdated to indicate that the password
must be updated (automatically) at the next successful login.
Parameters
- $username
- String Username for which to query the status.
Returns
boolean True if the user is outdated, false otherwise.
Overrides
|
public
void.
|
#
setOutdated( string $username )
Set the User status to outdated (in need of a password update).
Set the User status to outdated (in need of a password update).
Parameters
Returns
void.
Overrides
|
public
string
|
#
hashPassword( string $password )
Hashes the password using the PHP >= 5.5 hashing mechanisms.
Hashes the password using the PHP >= 5.5 hashing mechanisms.
Parameters
- $password
- Plain-text password.
Returns
string Hashed password.
|
public
string|
|
#
markPasswordReset( string $username )
Mark password reset.
Parameters
- $username
- Name of the user to mark.
Returns
string| Return seed.
Throws
Exception if the method is not reimplemented.
Overrides
|