Class ActiveDirectoryProxy
Manages Active Directory connections through the adLDAP library.
The configuration file for the ActiveDirectoryAuthenticator class is
config/active_directory_config.inc. A sample configuration file is
config/samples/active_directory_config.inc.sample.
A user with read-access to Active Directory must be set up in the
configuration file for queries to be possible.
-
hrm\user\proxy\AbstractProxy
-
hrm\user\proxy\ActiveDirectoryProxy
Namespace: hrm\
user\
proxy
Package: hrm
Located at user/proxy/ActiveDirectoryProxy.php
Methods summary
public
|
#
__construct( )
ActiveDirectoryProxy constructor: instantiates an
ActiveDirectoryProxy object with the settings specified in
the configuration file.
ActiveDirectoryProxy constructor: instantiates an
ActiveDirectoryProxy object with the settings specified in
the configuration file.
No parameters are passed to the constructor.
|
public
|
#
__destruct( )
Destructor. Closes the connection started by the adLDAP object.
Destructor. Closes the connection started by the adLDAP object.
|
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 'active directory'.
|
public
boolean
|
#
authenticate( string $username, string $password )
Authenticates the User with given username and password against Active
Directory.
Authenticates the User with given username and password against Active
Directory.
Parameters
- $username
- Username for authentication.
- $password
- Plain password for authentication.
Returns
boolean True if authentication succeeded, false otherwise.
|
public
string
|
#
getEmailAddress( string $username )
Returns the email address of user with given username.
Returns the email address of user with given username.
Parameters
- $username
- Username for which to query the email address.
Returns
string email address or "".
|
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.
|