Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
AuthControllerOverrideTrait Class Reference

Trait AuthControllerOverrideTrait. More...

+ Inheritance diagram for AuthControllerOverrideTrait:

Public Member Functions

 badLogin ()
 
 _getUserSessionKey ()
 
 _getBaseRoute ()
 To override Return the base route for this Auth controller.
 
 _getActiveUser ()
 To override for getting active user, default : USession::get("activeUser")
 
 _isValidUser ($action=null)
 Checks if user is valid for the action.
 

Protected Member Functions

 _connect ()
 Processes the data posted by the login form Have to return the connected user instance.
 
 onConnect ($connected)
 
 onBadCreditentials ()
 To override for defining a new action when creditentials are invalid.
 
 toCookie ($connected)
 Returns the value from connected user to save it in the cookie for auto connection.
 
 fromCookie ($cookie)
 Loads the user from database using the cookie value.
 
 rememberMe ($connected)
 Saves the connected user identifier in a cookie.
 
 getCookieUser ()
 Returns the cookie for auto connection.
 
 getFiles ()
 To override for changing view files.
 

Detailed Description

Trait AuthControllerOverrideTrait.

Definition at line 13 of file AuthControllerOverrideTrait.php.

Member Function Documentation

◆ _connect()

_connect ( )
abstractprotected

Processes the data posted by the login form Have to return the connected user instance.

◆ _getActiveUser()

_getActiveUser ( )

To override for getting active user, default : USession::get("activeUser")

Returns
string

Definition at line 51 of file AuthControllerOverrideTrait.php.

◆ _getBaseRoute()

_getBaseRoute ( )

To override Return the base route for this Auth controller.

Returns
string

Definition at line 24 of file AuthControllerOverrideTrait.php.

◆ _getUserSessionKey()

_getUserSessionKey ( )
abstract

Reimplemented in AuthControllerConfig.

◆ _isValidUser()

_isValidUser (   $action = null)
abstract

Checks if user is valid for the action.

Parameters
string$actionreturn boolean true if activeUser is valid

◆ badLogin()

badLogin ( )
abstract

Reimplemented in AuthController.

◆ fromCookie()

fromCookie (   $cookie)
protected

Loads the user from database using the cookie value.

Parameters
string$cookie

Definition at line 74 of file AuthControllerOverrideTrait.php.

◆ getCookieUser()

getCookieUser ( )
protected

Returns the cookie for auto connection.

Returns
NULL|string

Definition at line 94 of file AuthControllerOverrideTrait.php.

◆ getFiles()

getFiles ( )
protected

To override for changing view files.

Returns
AuthFiles

Definition at line 102 of file AuthControllerOverrideTrait.php.

◆ onBadCreditentials()

onBadCreditentials ( )
protected

To override for defining a new action when creditentials are invalid.

Definition at line 42 of file AuthControllerOverrideTrait.php.

◆ onConnect()

onConnect (   $connected)
abstractprotected
Parameters
object$connected

◆ rememberMe()

rememberMe (   $connected)
protected

Saves the connected user identifier in a cookie.

Parameters
object$connected

Definition at line 83 of file AuthControllerOverrideTrait.php.

◆ toCookie()

toCookie (   $connected)
protected

Returns the value from connected user to save it in the cookie for auto connection.

Parameters
object$connected

Definition at line 66 of file AuthControllerOverrideTrait.php.


The documentation for this class was generated from the following file: