modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php

Show: inherited
Table of Contents

Constants

Constant  DEFAULT_PORT = 389

\LDAPAuthenticateUser

Package:

This file is where the user authentication occurs. No redirection should happen in this file.

Parent(s)
\SugarAuthenticateUser

Methods

methodpublicauthenticateUser( 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
Name Type Description
$name STRING
$password STRING
Returns
Type Description
STRING id - used for loading the user Contributions by Erik Mitchell erikm@logicpd.com
methodpubliccreateUser( 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
Name Type Description
$name STRING
Returns
Type Description
STRING $id
methodpublicgetUserNameFilter(  $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
Name Type Description
$name
Returns
Type Description
String
methodpublicisSugarLogin( 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
Name Type Description
$name STRING
$password \STRIUNG
Returns
Type Description
boolean
methodpublicldap_rdn_lookup( string $user_name,  $password ) : string

Parameters
Name Type Description
$user_name string

the value provided in login form

$password
Returns
Type Description
string appropriate value for username when binding to directory server.
Details
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  
methodpublicloadUserOnLogin( STRING $name, STRING $password ) : boolean

this is called when a user logs in

Parameters
Name Type Description
$name STRING
$password STRING
Returns
Type Description
boolean
methodpublicloadUserOnSession( STRING $user_id = '' ) : boolean
inherited

Loads the current user bassed on the given user_id

Inherited from: \SugarAuthenticateUser::loadUserOnSession()
Parameters
Name Type Description
$user_id STRING
Returns
Type Description
boolean
methodpublicloginError( INT $error ) : boolean

Called with the error number of the last call if the error number is 0 there was no error otherwise it converts the error to a string and logs it as fatal

Parameters
Name Type Description
$error INT
Returns
Type Description
boolean
Documentation was generated by DocBlox 0.18.1.