modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php

Show: inherited
Table of Contents

\SugarAuthenticate

Package: SugarCRM

This file is used to control the authentication process.

It will call on the user authenticate and controll redirection based on the users validation

Children
\LDAPAuthenticate
\EmailAuthenticate
\SAMLAuthenticate

Properties

Propertypublic  $authenticationDir= ''SugarAuthenticate''
Default value'SugarAuthenticate'Details
Type
n/a
Propertypublic  $userAuthenticateClass= ''SugarAuthenticateUser''
Default value'SugarAuthenticateUser'Details
Type
n/a

Methods

methodpublicSugarAuthenticate( ) : \SugarAuthenticate

Constructs SugarAuthenticate This will load the user authentication class

Returns
Type Description
\SugarAuthenticate
methodpubliccanChangePassword( ) : void

If a user may change there password through the Sugar UI

methodpubliccanChangeUserName( ) : void

If a user may change there user name through the Sugar UI

methodpublicencodePassword( STRING $password ) : STRING

Encodes a users password. This is a static function and can be called at any time.

Parameters
Name Type Description
$password STRING
Returns
Type Description
STRING $encoded_password
methodpublicloginAuthenticate( string $username, string $password,  $fallback = false,  $PARAMS = array () ) : boolean

Authenticates a user based on the username and password returns true if the user was authenticated false otherwise it also will load the user into current user if he was authenticated

Parameters
Name Type Description
$username string
$password string
$fallback
$PARAMS
Returns
Type Description
boolean
methodpubliclogout( ) : void

Called when a user requests to logout

methodpublicpostLoginAuthenticate( ) : void

Once a user is authenticated on login this function will be called. Populate the session with what is needed and log anything that needs to be logged

methodpublicpostSessionAuthenticate( ) : boolean

Called after a session is authenticated - if this returns false the sessionAuthenticate will return false and destroy the session and it will load the current user

Returns
Type Description
boolean
methodpublicpre_login( ) : void

pre_login

This function allows the SugarAuthenticate subclasses to perform some pre login initialization as needed

methodpublicsessionAuthenticate( ) : boolean

On every page hit this will be called to ensure a user is authenticated

Returns
Type Description
boolean
methodpublicvalidateIP( ) : void

Make sure a user isn't stealing sessions so check the ip to ensure that the ip address hasn't dramatically changed

Documentation was generated by DocBlox 0.18.1.