modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php
Constants
\LDAPAuthenticateUser
Package:
This file is where the user authentication occurs. No redirection should happen in this file.
- Parent(s)
- \SugarAuthenticateUser
Methods
authenticateUser(
STRING $name, STRING $password
)
:
STRING
Does the actual authentication of the user and returns an id that will be used to load the current user (loadUserOnSession)
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | STRING | |
$password | STRING |
Type | Description |
---|---|
STRING | id - used for loading the user Contributions by Erik Mitchell erikm@logicpd.com |
createUser(
STRING $name
)
:
STRING
Creates a user with the given User Name and returns the id of that new user populates the user with what was set in ldapUserInfo
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | STRING |
Type | Description |
---|---|
STRING | $id |
getUserNameFilter(
$name
)
:
String
takes in a name and creates the appropriate search filter for that user name including any additional filters specified in the system settings page
Parameters
Returns
Name | Type | Description |
---|---|---|
$name |
Type | Description |
---|---|
String |
isSugarLogin(
STRING $name, \STRIUNG $password
)
:
boolean
inherited
Checks if a user is a sugarLogin user which implies they should use the sugar authentication to login
Inherited from: \SugarAuthenticateUser::isSugarLogin()
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | STRING | |
$password | \STRIUNG |
Type | Description |
---|---|
boolean |
ldap_rdn_lookup(
string $user_name, $password
)
:
string
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$user_name | string | the value provided in login form |
$password |
Type | Description |
---|---|
string | appropriate value for username when binding to directory server. |
- Desc
- Take the login username and return either said username for AD or lookup distinguished name using anonymous credentials for OpenLDAP. Contributions by Erik Mitchell erikm@logicpd.com
loadUserOnLogin(
STRING $name, STRING $password
)
:
boolean
this is called when a user logs in
Parameters
Returns
Name | Type | Description |
---|---|---|
$name | STRING | |
$password | STRING |
Type | Description |
---|---|
boolean |
loadUserOnSession(
STRING $user_id
=
''
)
:
boolean
inherited
Loads the current user bassed on the given user_id
Inherited from: \SugarAuthenticateUser::loadUserOnSession()
Parameters
Returns
Name | Type | Description |
---|---|---|
$user_id | STRING |
Type | Description |
---|---|
boolean |