modules/Users/authentication/AuthenticationController.php
\AuthenticationController
Package:
Properties
Methods

__construct(
STRING $type
=
'SugarAuthenticate'
)
:
\AuthenticationControllerCreates an instance of the authentication controller and loads it
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $type | STRING |
|
| Type | Description |
|---|---|
| \AuthenticationController | - |

getInstance(
string $type
=
'SugarAuthenticate'
)
:
\an
static
Returns an instance of the authentication controller
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $type | string | this is the type of authetnication you want to use default is SugarAuthenticate |
| Type | Description |
|---|---|
| \an | instance of the authetnciation controller |

login(
string $username, string $password, array $PARAMS
=
array()
)
:
booleanThis function is called when a user initially tries to login.
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $username | string | |
| $password | string | |
| $PARAMS | array |
| Type | Description |
|---|---|
| boolean | true if the user successfully logs in or false otherwise. |

logout(
)
:
voidCalled when a user requests to logout. Should invalidate the session and redirect to the login page.