Solutions Open Source

Référence de la classe t3lib_userAuth

Graphe d'héritage de t3lib_userAuth:

Inheritance graph
[légende]

Liste de tous les membres

Fonctions membres publiques

 start ()
 isSetSessionCookie ()
 isRefreshTimeBasedCookie ()
 checkAuthentication ()
 createUserSession ($tempuser)
 getNewSessionRecord ($tempuser)
 fetchUserSession ()
 logoff ()
 user_where_clause ()
 ipLockClause ()
 ipLockClause_remoteIPNumber ($parts)
 hashLockClause ()
 hashLockClause_getHashInt ()
 writeUC ($variable='')
 unpack_uc ($theUC='')
 pushModuleData ($module, $data, $noSave=0)
 getModuleData ($module, $type='')
 getSessionData ($key)
 setAndSaveSessionData ($key, $data)
 getLoginFormData ()
 processLoginData ($loginData, $security_level='')
 getAuthInfoArray ()
 compareUident ($user, $loginData, $security_level='')
 gc ()
 redirect ()
 writelog ($type, $action, $error, $details_nr, $details, $data, $tablename, $recuid, $recpid)
 checkLogFailures ()
 setBeUserByUid ($uid)
 setBeUserByName ($name)
 getRawUserByUid ($uid)
 getRawUserByName ($name)
 fetchUserRecord ($dbUser, $username, $extraWhere='')

Attributs publics

 $global_database = ''
 $session_table = ''
 $name = ''
 $get_name = ''
 $user_table = ''
 $username_column = ''
 $userident_column = ''
 $userid_column = ''
 $lastLogin_column = ''
 $enablecolumns
 $formfield_uname = ''
 $formfield_uident = ''
 $formfield_chalvalue = ''
 $formfield_status = ''
 $security_level = 'normal'
 $auth_include = ''
 $auth_timeout_field = 0
 $lifetime = 0
 $gc_time = 0
 $gc_probability = 1
 $writeStdLog = FALSE
 $writeAttemptLog = FALSE
 $sendNoCacheHeaders = TRUE
 $getFallBack = FALSE
 $hash_length = 32
 $getMethodEnabled = FALSE
 $lockIP = 4
 $lockHashKeyWords = 'useragent'
 $warningEmail = ''
 $warningPeriod = 3600
 $warningMax = 3
 $checkPid = TRUE
 $checkPid_value = 0
 $id
 $cookieId
 $loginFailure = FALSE
 $loginSessionStarted = FALSE
 $user
 $get_URL_ID = ''
 $newSessionID = FALSE
 $forceSetCookie = FALSE
 $dontSetCookie = FALSE
 $challengeStoredInCookie = FALSE
 $loginType = ''
 $svConfig = array()
 $writeDevLog = FALSE


Documentation des fonctions membres

t3lib_userAuth::start (  ) 

Starts a user session Typical configurations will: a) check if session cookie was set and if not, set one, b) check if a password/username was sent and if so, try to authenticate the user c) Lookup a session attached to a user and check timeout etc. d) Garbage collection, setting of no-cache headers. If a user is authenticated the database record of the user (array) will be set in the ->user internal variable.

Renvoie:
void

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::isSetSessionCookie (  ) 

Determins whether a session cookie needs to be set (lifetime=0)

Renvoie:
boolean

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::isRefreshTimeBasedCookie (  ) 

Determins whether a non-session cookie needs to be set (lifetime>0)

Renvoie:
boolean

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::checkAuthentication (  ) 

Checks if a submission of username and password is present or use other authentication by auth services

Renvoie:
void

t3lib_userAuth::createUserSession ( tempuser  ) 

Creates a user session record.

Paramètres:
array user data array
Renvoie:
void

t3lib_userAuth::getNewSessionRecord ( tempuser  ) 

Returns a new session record for the current user for insertion into the DB. This function is mainly there as a wrapper for inheriting classes to override it.

Renvoie:
array user session record

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::fetchUserSession (  ) 

Read the user session from db.

Renvoie:
array user session data

t3lib_userAuth::logoff (  ) 

Log out current user! Removes the current session record, sets the internal ->user array to a blank string; Thereby the current user (if any) is effectively logged out!

Renvoie:
void

t3lib_userAuth::user_where_clause (  ) 

This returns the where-clause needed to select the user with respect flags like deleted, hidden, starttime, endtime

Renvoie:
string private

Réimplémentée dans local_beUserAuth.

t3lib_userAuth::ipLockClause (  ) 

This returns the where-clause needed to lock a user to the IP address

Renvoie:
string private

t3lib_userAuth::ipLockClause_remoteIPNumber ( parts  ) 

Returns the IP address to lock to. The IP address may be partial based on $parts.

Paramètres:
integer 1-4: Indicates how many parts of the IP address to return. 4 means all, 1 means only first number.
Renvoie:
string (Partial) IP address for REMOTE_ADDR private

t3lib_userAuth::hashLockClause (  ) 

This returns the where-clause needed to lock a user to a hash integer

Renvoie:
string private

t3lib_userAuth::hashLockClause_getHashInt (  ) 

Creates hash integer to lock user to. Depends on configured keywords

Renvoie:
integer Hash integer private

t3lib_userAuth::writeUC ( variable = ''  ) 

This writes $variable to the user-record. This is a way of providing session-data. You can fetch the data again through $this->uc in this class! If $variable is not an array, $this->uc is saved!

Paramètres:
array An array you want to store for the user as session data. If $variable is not supplied (is blank string), the internal variable, ->uc, is stored by default
Renvoie:
void

t3lib_userAuth::unpack_uc ( theUC = ''  ) 

Sets $theUC as the internal variable ->uc IF $theUC is an array. If $theUC is false, the 'uc' content from the ->user array will be unserialized and restored in ->uc

Paramètres:
mixed If an array, then set as ->uc, otherwise load from user record
Renvoie:
void

t3lib_userAuth::pushModuleData ( module,
data,
noSave = 0 
)

Stores data for a module. The data is stored with the session id so you can even check upon retrieval if the module data is from a previous session or from the current session.

Paramètres:
string $module is the name of the module ($MCONF['name'])
mixed $data is the data you want to store for that module (array, string, ...)
boolean If $noSave is set, then the ->uc array (which carries all kinds of user data) is NOT written immediately, but must be written by some subsequent call.
Renvoie:
void

t3lib_userAuth::getModuleData ( module,
type = '' 
)

Gets module data for a module (from a loaded ->uc array)

Paramètres:
string $module is the name of the module ($MCONF['name'])
string If $type = 'ses' then module data is returned only if it was stored in the current session, otherwise data from a previous session will be returned (if available).
Renvoie:
mixed The module data if available: $this->uc['moduleData'][$module];

t3lib_userAuth::getSessionData ( key  ) 

Returns the session data stored for $key. The data will last only for this login session since it is stored in the session table.

Paramètres:
string Pointer to an associative key in the session data array which is stored serialized in the field "ses_data" of the session table.
Renvoie:
mixed

t3lib_userAuth::setAndSaveSessionData ( key,
data 
)

Sets the session data ($data) for $key and writes all session data (from ->user['ses_data']) to the database. The data will last only for this login session since it is stored in the session table.

Paramètres:
string Pointer to an associative key in the session data array which is stored serialized in the field "ses_data" of the session table.
mixed The variable to store in index $key
Renvoie:
void

t3lib_userAuth::getLoginFormData (  ) 

Returns an info array with Login/Logout data submitted by a form or params

Renvoie:
array

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::processLoginData ( loginData,
security_level = '' 
)

Processes Login data submitted by a form or params depending on the security_level

Paramètres:
array login data array
string Alternative security_level. Used when authentication services wants to override the default.
Renvoie:
array processed login data array

t3lib_userAuth::getAuthInfoArray (  ) 

Returns an info array which provides additional information for auth services

Renvoie:
array

t3lib_userAuth::compareUident ( user,
loginData,
security_level = '' 
)

Check the login data with the user record data for builtin login methods

Paramètres:
array user data array
array login data array
string Alternative security_level. Used when authentication services wants to override the default.
Renvoie:
boolean true if login data matched

t3lib_userAuth::gc (  ) 

Garbage collector, removing old expired sessions.

Renvoie:
void

t3lib_userAuth::redirect (  ) 

Redirect to somewhere. Obsolete, deprecated etc.

Renvoie:
void

t3lib_userAuth::writelog ( type,
action,
error,
details_nr,
details,
data,
tablename,
recuid,
recpid 
)

DUMMY: Writes to log database table (in some extension classes)

Paramètres:
integer $type: denotes which module that has submitted the entry. This is the current list: 1=tce_db; 2=tce_file; 3=system (eg. sys_history save); 4=modules; 254=Personal settings changed; 255=login / out action: 1=login, 2=logout, 3=failed login (+ errorcode 3), 4=failure_warning_email sent
integer 
action
type. Also used to trigger update of the interface. (see the log-module for the meaning of each number !!)
integer $error: flag. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)
integer 
details_nr
type and $action. in the future this will make it possible to translate errormessages to other languages
string $details: Default text that follows the message
array $data: Data that follows the log. Might be used to carry special information. If an array the first 5 entries (0-4) will be sprintf'ed the details-text...
string 
tablename
tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)
integer 
recuid
tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)
integer 
recpid
tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)
Renvoie:
void
Voir également:
t3lib_userauthgroup::writelog()

t3lib_userAuth::checkLogFailures (  ) 

DUMMY: Check login failures (in some extension classes)

Renvoie:
void

t3lib_userAuth::setBeUserByUid ( uid  ) 

Raw initialization of the be_user with uid=$uid This will circumvent all login procedures and select a be_users record from the database and set the content of ->user to the record selected. Thus the BE_USER object will appear like if a user was authenticated - however without a session id and the fields from the session table of course. Will check the users for disabled, start/endtime, etc. ($this->user_where_clause())

Paramètres:
integer The UID of the backend user to set in ->user
Renvoie:
void

t3lib_userAuth::setBeUserByName ( name  ) 

Raw initialization of the be_user with username=$name

Paramètres:
string The username to look up.
Renvoie:
void
Voir également:
t3lib_userAuth::setBeUserByUid()

t3lib_userAuth::getRawUserByUid ( uid  ) 

Fetching raw user record with uid=$uid

Paramètres:
integer The UID of the backend user to set in ->user
Renvoie:
array user record or FALSE

t3lib_userAuth::getRawUserByName ( name  ) 

Fetching raw user record with username=$name

Paramètres:
string The username to look up.
Renvoie:
array user record or FALSE
Voir également:
t3lib_userAuth::getUserByUid()

t3lib_userAuth::fetchUserRecord ( dbUser,
username,
extraWhere = '' 
)

Get a user from DB by username provided for usage from services

Paramètres:
array User db table definition: $this->db_user
string user name
string additional WHERE clause: " AND ...
Renvoie:
mixed user array or FALSE


Documentation des données membres

t3lib_userAuth::$global_database = ''

t3lib_userAuth::$session_table = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$name = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$get_name = ''

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::$user_table = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$username_column = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$userident_column = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$userid_column = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$lastLogin_column = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$enablecolumns

Valeur initiale :

 Array (
                'rootLevel' => '',                      // Boolean: If true, 'AND pid=0' will be a part of the query...
                'disabled' => '',
                'starttime' => '',
                'endtime' => '',
                'deleted' => ''
        )

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$formfield_uname = ''

Réimplémentée dans t3lib_beUserAuth, t3lib_tsfeBeUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$formfield_uident = ''

Réimplémentée dans t3lib_beUserAuth, t3lib_tsfeBeUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$formfield_chalvalue = ''

Réimplémentée dans t3lib_beUserAuth, t3lib_tsfeBeUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$formfield_status = ''

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$security_level = 'normal'

Réimplémentée dans t3lib_beUserAuth, t3lib_tsfeBeUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$auth_include = ''

Réimplémentée dans t3lib_beUserAuth, t3lib_tsfeBeUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$auth_timeout_field = 0

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$lifetime = 0

Réimplémentée dans t3lib_beUserAuth, et tslib_feUserAuth.

t3lib_userAuth::$gc_time = 0

t3lib_userAuth::$gc_probability = 1

t3lib_userAuth::$writeStdLog = FALSE

Réimplémentée dans t3lib_beUserAuth, et t3lib_tsfeBeUserAuth.

t3lib_userAuth::$writeAttemptLog = FALSE

Réimplémentée dans t3lib_beUserAuth, et t3lib_tsfeBeUserAuth.

t3lib_userAuth::$sendNoCacheHeaders = TRUE

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::$getFallBack = FALSE

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::$hash_length = 32

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::$getMethodEnabled = FALSE

Réimplémentée dans tslib_feUserAuth.

t3lib_userAuth::$lockIP = 4

t3lib_userAuth::$lockHashKeyWords = 'useragent'

t3lib_userAuth::$warningEmail = ''

t3lib_userAuth::$warningPeriod = 3600

t3lib_userAuth::$warningMax = 3

t3lib_userAuth::$checkPid = TRUE

t3lib_userAuth::$checkPid_value = 0

t3lib_userAuth::$id

t3lib_userAuth::$cookieId

t3lib_userAuth::$loginFailure = FALSE

t3lib_userAuth::$loginSessionStarted = FALSE

t3lib_userAuth::$user

t3lib_userAuth::$get_URL_ID = ''

t3lib_userAuth::$newSessionID = FALSE

t3lib_userAuth::$forceSetCookie = FALSE

t3lib_userAuth::$dontSetCookie = FALSE

t3lib_userAuth::$challengeStoredInCookie = FALSE

Réimplémentée dans t3lib_beUserAuth.

t3lib_userAuth::$loginType = ''

t3lib_userAuth::$svConfig = array()

t3lib_userAuth::$writeDevLog = FALSE


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:43:04 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3