Documentation TYPO3 par Ameos |
Definition at line 111 of file class.t3lib_userauth.php.
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.
Reimplemented in tslib_feUserAuth.
Definition at line 195 of file class.t3lib_userauth.php.
References $id, t3lib_div::_GET(), t3lib_div::arrayToLogString(), t3lib_div::callUserFunction(), checkAuthentication(), t3lib_div::devLog(), fetchUserSession(), gc(), t3lib_div::getIndpEnv(), t3lib_div::intInRange(), isRefreshTimeBasedCookie(), isSetSessionCookie(), redirect(), and t3lib_div::sysLog().
t3lib_userAuth::isSetSessionCookie | ( | ) |
Determins whether a session cookie needs to be set (lifetime=0)
Reimplemented in tslib_feUserAuth.
Definition at line 334 of file class.t3lib_userauth.php.
Referenced by start().
t3lib_userAuth::isRefreshTimeBasedCookie | ( | ) |
Determins whether a non-session cookie needs to be set (lifetime>0)
Reimplemented in tslib_feUserAuth.
Definition at line 344 of file class.t3lib_userauth.php.
Referenced by start().
t3lib_userAuth::checkAuthentication | ( | ) |
Checks if a submission of username and password is present or use other authentication by auth services
Definition at line 354 of file class.t3lib_userauth.php.
References t3lib_div::arrayToLogString(), createUserSession(), t3lib_div::devLog(), fetchUserSession(), getAuthInfoArray(), t3lib_div::getIndpEnv(), getLoginFormData(), logoff(), t3lib_div::makeInstanceService(), and writelog().
Referenced by start().
t3lib_userAuth::createUserSession | ( | $ | tempuser | ) |
Creates a user session record.
array | user data array |
Definition at line 601 of file class.t3lib_userauth.php.
References t3lib_div::devLog(), and getNewSessionRecord().
Referenced by checkAuthentication().
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.
Reimplemented in tslib_feUserAuth.
Definition at line 632 of file class.t3lib_userauth.php.
References hashLockClause_getHashInt(), and ipLockClause_remoteIPNumber().
Referenced by createUserSession().
t3lib_userAuth::fetchUserSession | ( | ) |
Read the user session from db.
Definition at line 648 of file class.t3lib_userauth.php.
References $user, t3lib_div::devLog(), and logoff().
Referenced by checkAuthentication(), and start().
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!
Definition at line 699 of file class.t3lib_userauth.php.
References t3lib_div::callUserFunction(), and t3lib_div::devLog().
Referenced by checkAuthentication(), compareUident(), and fetchUserSession().
t3lib_userAuth::user_where_clause | ( | ) |
This returns the where-clause needed to select the user with respect flags like deleted, hidden, starttime, endtime
Reimplemented in local_beUserAuth.
Definition at line 755 of file class.t3lib_userauth.php.
Referenced by getAuthInfoArray(), getRawUserByName(), and getRawUserByUid().
t3lib_userAuth::ipLockClause | ( | ) |
This returns the where-clause needed to lock a user to the IP address
Definition at line 769 of file class.t3lib_userauth.php.
t3lib_userAuth::ipLockClause_remoteIPNumber | ( | $ | parts | ) |
Returns the IP address to lock to. The IP address may be partial based on $parts.
integer | 1-4: Indicates how many parts of the IP address to return. 4 means all, 1 means only first number. |
Definition at line 787 of file class.t3lib_userauth.php.
References t3lib_div::getIndpEnv(), and t3lib_div::intInRange().
Referenced by getNewSessionRecord().
t3lib_userAuth::hashLockClause | ( | ) |
This returns the where-clause needed to lock a user to a hash integer
Definition at line 808 of file class.t3lib_userauth.php.
References hashLockClause_getHashInt().
t3lib_userAuth::hashLockClause_getHashInt | ( | ) |
Creates hash integer to lock user to. Depends on configured keywords
Definition at line 819 of file class.t3lib_userauth.php.
References t3lib_div::inList(), and t3lib_div::md5int().
Referenced by getNewSessionRecord(), and hashLockClause().
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!
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 |
Definition at line 851 of file class.t3lib_userauth.php.
References t3lib_div::devLog().
Referenced by t3lib_beUserAuth::backendSetUC(), t3lib_tsfeBeUserAuth::extSaveFeAdminConfig(), pushModuleData(), and tslib_feUserAuth::storeSessionData().
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
mixed | If an array, then set as ->uc, otherwise load from user record |
Definition at line 866 of file class.t3lib_userauth.php.
Referenced by t3lib_beUserAuth::backendSetUC().
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.
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. |
Definition at line 882 of file class.t3lib_userauth.php.
References writeUC().
t3lib_userAuth::getModuleData | ( | $ | module, | |
$ | type = '' | |||
) |
Gets module data for a module (from a loaded ->uc array)
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). |
Definition at line 895 of file class.t3lib_userauth.php.
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.
string | Pointer to an associative key in the session data array which is stored serialized in the field "ses_data" of the session table. |
Definition at line 908 of file class.t3lib_userauth.php.
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.
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 |
Definition at line 921 of file class.t3lib_userauth.php.
References t3lib_div::devLog().
t3lib_userAuth::getLoginFormData | ( | ) |
Returns an info array with Login/Logout data submitted by a form or params
Reimplemented in tslib_feUserAuth.
Definition at line 954 of file class.t3lib_userauth.php.
References t3lib_div::_GP(), t3lib_div::_POST(), and processLoginData().
Referenced by checkAuthentication().
t3lib_userAuth::processLoginData | ( | $ | loginData, | |
$ | security_level = '' | |||
) |
Processes Login data submitted by a form or params depending on the security_level
array | login data array | |
string | Alternative security_level. Used when authentication services wants to override the default. |
Definition at line 981 of file class.t3lib_userauth.php.
References $security_level.
Referenced by getLoginFormData().
t3lib_userAuth::getAuthInfoArray | ( | ) |
Returns an info array which provides additional information for auth services
Definition at line 1023 of file class.t3lib_userauth.php.
References t3lib_div::getIndpEnv(), and user_where_clause().
Referenced by checkAuthentication(), and tslib_feUserAuth::fetchGroupData().
t3lib_userAuth::compareUident | ( | $ | user, | |
$ | loginData, | |||
$ | security_level = '' | |||
) |
Check the login data with the user record data for builtin login methods
array | user data array | |
array | login data array | |
string | Alternative security_level. Used when authentication services wants to override the default. |
Definition at line 1053 of file class.t3lib_userauth.php.
References $security_level, $user, t3lib_div::devLog(), and logoff().
t3lib_userAuth::gc | ( | ) |
Garbage collector, removing old expired sessions.
Definition at line 1092 of file class.t3lib_userauth.php.
Referenced by start().
t3lib_userAuth::redirect | ( | ) |
Redirect to somewhere. Obsolete, deprecated etc.
Definition at line 1106 of file class.t3lib_userauth.php.
Referenced by start().
t3lib_userAuth::writelog | ( | $ | type, | |
$ | action, | |||
$ | error, | |||
$ | details_nr, | |||
$ | details, | |||
$ | data, | |||
$ | tablename, | |||
$ | recuid, | |||
$ | recpid | |||
) |
DUMMY: Writes to log database table (in some extension classes)
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 |
| |
integer | $error: flag. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin) | |
integer |
| |
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 |
| |
integer |
| |
integer |
|
Definition at line 1128 of file class.t3lib_userauth.php.
Referenced by checkAuthentication().
t3lib_userAuth::checkLogFailures | ( | ) |
DUMMY: Check login failures (in some extension classes)
Definition at line 1137 of file class.t3lib_userauth.php.
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())
integer | The UID of the backend user to set in ->user |
Definition at line 1150 of file class.t3lib_userauth.php.
References getRawUserByUid().
t3lib_userAuth::setBeUserByName | ( | $ | name | ) |
Raw initialization of the be_user with username=$name
string | The username to look up. |
Definition at line 1162 of file class.t3lib_userauth.php.
References $name, and getRawUserByName().
Referenced by t3lib_beUserAuth::checkCLIuser().
t3lib_userAuth::getRawUserByUid | ( | $ | uid | ) |
Fetching raw user record with uid=$uid
integer | The UID of the backend user to set in ->user |
Definition at line 1173 of file class.t3lib_userauth.php.
References $user, and user_where_clause().
Referenced by setBeUserByUid().
t3lib_userAuth::getRawUserByName | ( | $ | name | ) |
Fetching raw user record with username=$name
string | The username to look up. |
Definition at line 1191 of file class.t3lib_userauth.php.
References $name, $user, and user_where_clause().
Referenced by setBeUserByName().
t3lib_userAuth::fetchUserRecord | ( | $ | dbUser, | |
$ | username, | |||
$ | extraWhere = '' | |||
) |
Get a user from DB by username provided for usage from services
array | User db table definition: $this->db_user | |
string | user name | |
string | additional WHERE clause: " AND ... |
Definition at line 1230 of file class.t3lib_userauth.php.
References $user.
t3lib_userAuth::$enablecolumns |
Initial value:
Array (
'rootLevel' => '', // Boolean: If true, 'AND pid=0' will be a part of the query...
'disabled' => '',
'starttime' => '',
'endtime' => '',
'deleted' => ''
)
Reimplemented in t3lib_beUserAuth, and tslib_feUserAuth.
Definition at line 123 of file class.t3lib_userauth.php.