427 if (empty($this->loginType)) {
428 throw new \TYPO3\CMS\Core\Exception(
'No loginType defined, should be set explicitly by subclass');
431 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'writeDevLog']) {
432 $this->writeDevLog = TRUE;
434 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'writeDevLog' . $this->loginType]) {
435 $this->writeDevLog = TRUE;
438 $this->writeDevLog = TRUE;
440 if ($this->writeDevLog) {
441 GeneralUtility::devLog(
'## Beginning of auth logging.',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
445 $this->newSessionID = FALSE;
448 $this->svConfig =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SVCONF'][
'auth'];
451 if (!
$id && $this->getFallBack && $this->get_name) {
453 if (strlen(
$id) != $this->hash_length) {
464 $this->newSessionID = TRUE;
469 if ($mode ==
'get' && $this->getFallBack && $this->get_name) {
470 $this->get_URL_ID =
'&' . $this->get_name .
'=' .
$id;
477 if ($this->sendNoCacheHeaders && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
478 header(
'Expires: 0');
479 header(
'Last-Modified: ' . gmdate(
'D, d M Y H:i:s') .
' GMT');
480 $cacheControlHeader =
'no-cache, must-revalidate';
481 $pragmaHeader =
'no-cache';
488 $cacheControlHeader =
'must-revalidate';
490 $pragmaHeader =
'private';
492 header(
'Cache-Control: ' . $cacheControlHeader);
493 header(
'Pragma: ' . $pragmaHeader);
499 if (!$this->dontSetCookie) {
503 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'postUserLookUp'])) {
504 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'postUserLookUp'] as $funcName) {
512 if ($this->gc_time == 0) {
517 if (rand() % 100 <= $this->gc_probability) {
531 if ($isSetSessionCookie || $isRefreshTimeBasedCookie) {
532 $settings =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'];
538 $cookieExpire = $isRefreshTimeBasedCookie ?
$GLOBALS[
'EXEC_TIME'] + $this->lifetime : 0;
542 $cookieHttpOnly = (bool) $settings[
'cookieHttpOnly'];
545 setcookie($this->name, $this->
id, $cookieExpire, $cookiePath, $cookieDomain, $cookieSecure, $cookieHttpOnly);
546 $this->cookieWasSetOnCurrentRequest = TRUE;
548 throw new \TYPO3\CMS\Core\Exception(
'Cookie was not set since HTTPS was forced in $TYPO3_CONF_VARS[SYS][cookieSecure].', 1254325546);
550 if ($this->writeDevLog) {
551 $devLogMessage = ($isRefreshTimeBasedCookie ?
'Updated Cookie: ' :
'Set Cookie: ') . $this->
id;
552 GeneralUtility::devLog($devLogMessage . ($cookieDomain ?
', ' . $cookieDomain :
''),
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
565 $cookieDomain =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'cookieDomain'];
568 if (!empty(
$GLOBALS[
'TYPO3_CONF_VARS'][$this->loginType][
'cookieDomain'])) {
572 if ($cookieDomain[0] ==
'/') {
575 if ($matchCnt === FALSE) {
576 GeneralUtility::sysLog(
'The regular expression for the cookie domain (' . $cookieDomain .
') contains errors. The session is not shared across sub-domains.',
'Core',
GeneralUtility::SYSLOG_SEVERITY_ERROR);
577 } elseif ($matchCnt) {
594 return isset($_COOKIE[$cookieName]) ? stripslashes($_COOKIE[$cookieName]) :
'';
605 return ($this->newSessionID || $this->forceSetCookie) && $this->lifetime == 0;
616 return $this->lifetime > 0;
629 $tempuserArr = array();
632 $authenticated = FALSE;
634 $activeLogin = FALSE;
636 $this->loginFailure = FALSE;
637 if ($this->writeDevLog) {
638 GeneralUtility::devLog(
'Login type: ' . $this->loginType,
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
644 if ($this->writeDevLog) {
648 if ($loginData[
'status'] ==
'logout') {
649 if ($this->writeStdLog) {
651 $this->
writelog(255, 2, 0, 2,
'User %s logged out', array($this->user[
'username']),
'', 0, 0);
654 if ($this->writeDevLog) {
655 GeneralUtility::devLog(
'User logged out. Id: ' . $this->
id,
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
660 if ($loginData[
'status'] ==
'login') {
662 if ($this->writeDevLog) {
663 GeneralUtility::devLog(
'Active login (eg. with login form)',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
666 if ($this->formfield_status && $loginData[
'uident'] && $loginData[
'uname']) {
668 if (!$this->getMethodEnabled && ($httpHost != $authInfo[
'refInfo'][
'host'] && !
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'doNotCheckReferer'])) {
669 throw new \RuntimeException(
'TYPO3 Fatal Error: Error: This host address ("' . $httpHost .
'") and the referer host ("' . $authInfo[
'refInfo'][
'host'] .
'") mismatches!<br /> 670 It\'s possible that the environment variable HTTP_REFERER is not passed to the script because of a proxy.<br /> 671 The site administrator can disable this check in the "All Configuration" section of the Install Tool (flag: TYPO3_CONF_VARS[SYS][doNotCheckReferer]).', 1270853930);
678 if (strtoupper(substr($loginData[
'uname'], 0, 5)) ==
'_CLI_' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
679 throw new \RuntimeException(
'TYPO3 Fatal Error: You have tried to login using a CLI user. Access prohibited!', 1270853931);
687 $haveSession = FALSE;
688 if (!$this->newSessionID) {
691 $haveSession = is_array($authInfo[
'userSession']) ? TRUE : FALSE;
693 if ($this->writeDevLog) {
697 GeneralUtility::devLog(
'No user session found.',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
699 if (is_array($this->svConfig[
'setup'])) {
705 $activeLogin || $this->svConfig[
'setup'][$this->loginType .
'_alwaysFetchUser']
706 || !$haveSession && $this->svConfig[
'setup'][$this->loginType .
'_fetchUserIfNoSession']
713 $serviceChain .=
',' . $serviceObj->getServiceKey();
714 $serviceObj->initAuth($subType, $loginData, $authInfo, $this);
715 if ($row = $serviceObj->getUser()) {
716 $tempuserArr[] = $row;
717 if ($this->writeDevLog) {
721 if (!$this->svConfig[
'setup'][($this->loginType .
'_fetchAllUsers')]) {
728 if ($this->writeDevLog && $this->svConfig[
'setup'][$this->loginType .
'_alwaysFetchUser']) {
729 GeneralUtility::devLog($this->loginType .
'_alwaysFetchUser option is enabled',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
731 if ($this->writeDevLog && $serviceChain) {
732 GeneralUtility::devLog($subType .
' auth services called: ' . $serviceChain,
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
734 if ($this->writeDevLog && !count($tempuserArr)) {
735 GeneralUtility::devLog(
'No user found by services',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
737 if ($this->writeDevLog && count($tempuserArr)) {
738 GeneralUtility::devLog(count($tempuserArr) .
' user records found by services',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
742 if (!count($tempuserArr) && $haveSession) {
743 $tempuserArr[] = $authInfo[
'userSession'];
744 $tempuser = $authInfo[
'userSession'];
746 $authenticated = TRUE;
747 if ($this->writeDevLog) {
752 if ($this->svConfig[
'setup'][$this->loginType .
'_alwaysAuthUser']) {
753 $authenticated = FALSE;
754 if ($this->writeDevLog) {
755 GeneralUtility::devLog(
'alwaysAuthUser option is enabled',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
759 if (count($tempuserArr) && !$authenticated) {
760 foreach ($tempuserArr as $tempuser) {
764 if ($this->writeDevLog) {
770 $serviceChain .=
',' . $serviceObj->getServiceKey();
771 $serviceObj->initAuth($subType, $loginData, $authInfo, $this);
772 if (($ret = $serviceObj->authUser($tempuser)) > 0) {
774 if ((
int)$ret >= 200) {
775 $authenticated = TRUE;
777 } elseif ((
int)$ret >= 100) {
780 $authenticated = TRUE;
783 $authenticated = FALSE;
789 if ($this->writeDevLog && $serviceChain) {
790 GeneralUtility::devLog($subType .
' auth services called: ' . $serviceChain,
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
792 if ($authenticated) {
799 if ($authenticated) {
801 $this->loginFailure = FALSE;
803 if (!($haveSession && ($tempuser[
'ses_id'] == $this->
id || $tempuser[
'uid'] == $authInfo[
'userSession'][
'ses_userid']))) {
806 $this->user = array_merge(
812 $this->loginSessionStarted = TRUE;
813 if ($this->writeDevLog && is_array($this->user)) {
816 } elseif ($haveSession) {
817 $this->user = $authInfo[
'userSession'];
819 if ($activeLogin && !$this->newSessionID) {
823 if ($this->writeStdLog && $activeLogin) {
824 $this->
writelog(255, 1, 0, 1,
'User %s logged in from %s (%s)', array($tempuser[$this->username_column],
GeneralUtility::getIndpEnv(
'REMOTE_ADDR'),
GeneralUtility::getIndpEnv(
'REMOTE_HOST')),
'',
'',
'', -1,
'', $tempuser[
'uid']);
826 if ($this->writeDevLog && $activeLogin) {
829 if ($this->writeDevLog && !$activeLogin) {
832 if ((
int)
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'lockSSL'] === 3 && $this->user_table ===
'be_users') {
837 list($server, $address) = explode(
'/', $url, 2);
838 if ((
int)
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'lockSSLPort']) {
839 $sslPortSuffix =
':' . (int)$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'lockSSLPort'];
841 $server = str_replace($sslPortSuffix,
'', $server);
846 } elseif ($activeLogin || count($tempuserArr)) {
847 $this->loginFailure = TRUE;
848 if ($this->writeDevLog && !count($tempuserArr) && $activeLogin) {
851 if ($this->writeDevLog && count($tempuserArr)) {
856 if ($this->loginFailure && $activeLogin) {
857 if ($this->writeDevLog) {
858 GeneralUtility::devLog(
'Call checkLogFailures: ' .
GeneralUtility::arrayToLogString(array(
'warningEmail' => $this->warningEmail,
'warningPeriod' => $this->warningPeriod,
'warningMax' => $this->warningMax)),
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
863 !empty(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'postLoginFailureProcessing'])
864 && is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'postLoginFailureProcessing'])
867 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'postLoginFailureProcessing'] as $_funcRef) {
875 $this->
checkLogFailures($this->warningEmail, $this->warningPeriod, $this->warningMax);
897 $this->db->exec_UPDATEquery(
898 $this->session_table,
899 'ses_id = ' . $this->db->fullQuoteStr($oldSessionId, $this->session_table)
900 .
' AND ses_name = ' . $this->db->fullQuoteStr($this->name, $this->session_table),
901 array(
'ses_id' => $this->
id)
904 $this->newSessionID = TRUE;
921 if ($this->writeDevLog) {
922 GeneralUtility::devLog(
'Create session ses_id = ' . $this->
id,
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
925 $this->db->exec_DELETEquery(
926 $this->session_table,
927 'ses_id = ' . $this->db->fullQuoteStr($this->id, $this->session_table)
928 .
' AND ses_name = ' . $this->db->fullQuoteStr($this->name, $this->session_table)
932 $inserted = (boolean) $this->db->exec_INSERTquery($this->session_table, $insertFields);
934 $message =
'Session data could not be written to DB. Error: ' . $this->db->sql_error();
936 if ($this->writeDevLog) {
941 if ($this->lastLogin_column && $inserted) {
942 $this->db->exec_UPDATEquery(
944 $this->userid_column .
'=' . $this->db->fullQuoteStr($tempuser[$this->userid_column], $this->user_table),
945 array($this->lastLogin_column =>
$GLOBALS[
'EXEC_TIME'])
949 return $inserted ? $insertFields : array();
962 'ses_id' => $this->
id,
963 'ses_name' => $this->name,
966 'ses_userid' => $tempuser[$this->userid_column],
967 'ses_tstamp' =>
$GLOBALS[
'EXEC_TIME']
980 if ($this->writeDevLog) {
981 GeneralUtility::devLog(
'Fetch session ses_id = ' . $this->
id,
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
988 $statement->execute();
989 $user = $statement->fetch();
994 if (\
TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->auth_timeout_field)) {
996 $timeout = (int)$this->auth_timeout_field;
999 $timeout = (int)
$user[$this->auth_timeout_field];
1003 if ($timeout > 0 &&
$GLOBALS[
'EXEC_TIME'] <
$user[
'ses_tstamp'] + $timeout) {
1004 if (!$skipSessionUpdate) {
1005 $this->db->exec_UPDATEquery($this->session_table,
'ses_id=' . $this->db->fullQuoteStr($this->id, $this->session_table)
1006 .
' AND ses_name=' . $this->db->fullQuoteStr($this->name, $this->session_table), array(
'ses_tstamp' =>
$GLOBALS[
'EXEC_TIME']));
1028 if ($this->writeDevLog) {
1029 GeneralUtility::devLog(
'logoff: ses_id = ' . $this->
id,
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
1034 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'logoff_pre_processing'])) {
1036 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'logoff_pre_processing'] as $_funcRef) {
1042 $this->db->exec_DELETEquery($this->session_table,
'ses_id = ' . $this->db->fullQuoteStr($this->id, $this->session_table) .
' 1043 AND ses_name = ' . $this->db->fullQuoteStr($this->name, $this->session_table));
1046 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'logoff_post_processing'])) {
1048 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_userauth.php'][
'logoff_post_processing'] as $_funcRef) {
1066 setcookie($cookieName, NULL, -1, $cookiePath, $cookieDomain);
1078 $statement = $this->db->prepare_SELECTquery(
'COUNT(*)', $this->session_table,
'ses_id = :ses_id');
1079 $statement->execute(array(
':ses_id' =>
$id));
1080 $row = $statement->fetch(\
TYPO3\CMS\Core\Database\PreparedStatement::FETCH_NUM);
1082 return $row[0] ? TRUE : FALSE;
1093 return $this->cookieWasSetOnCurrentRequest || $this->
getCookie($this->name);
1114 if (
$GLOBALS[
'CLIENT'][
'BROWSER'] ==
'flash') {
1118 $statement = $this->db->prepare_SELECTquery(
'*', $this->session_table .
',' . $this->user_table, $this->session_table .
'.ses_id = :ses_id 1119 AND ' . $this->session_table .
'.ses_name = :ses_name 1120 AND ' . $this->session_table .
'.ses_userid = ' . $this->user_table .
'.' . $this->userid_column .
' 1121 ' . $ipLockClause[
'where'] .
' 1123 $statement->bindValues(array(
1124 ':ses_id' => $this->
id,
1125 ':ses_name' => $this->name
1127 $statement->bindValues($ipLockClause[
'parameters']);
1130 $statement = $this->db->prepare_SELECTquery(
'*', $this->session_table .
',' . $this->user_table, $this->session_table .
'.ses_id = :ses_id 1131 AND ' . $this->session_table .
'.ses_name = :ses_name 1132 AND ' . $this->session_table .
'.ses_userid = ' . $this->user_table .
'.' . $this->userid_column .
' 1133 ' . $ipLockClause[
'where'] .
' 1136 $statement->bindValues(array(
1137 ':ses_id' => $this->
id,
1138 ':ses_name' => $this->name
1140 $statement->bindValues($ipLockClause[
'parameters']);
1154 if ($this->enablecolumns[
'rootLevel']) {
1155 $whereClause .=
'AND ' . $this->user_table .
'.pid=0 ';
1157 if ($this->enablecolumns[
'disabled']) {
1158 $whereClause .=
' AND ' . $this->user_table .
'.' . $this->enablecolumns[
'disabled'] .
'=0';
1160 if ($this->enablecolumns[
'deleted']) {
1161 $whereClause .=
' AND ' . $this->user_table .
'.' . $this->enablecolumns[
'deleted'] .
'=0';
1163 if ($this->enablecolumns[
'starttime']) {
1164 $whereClause .=
' AND (' . $this->user_table .
'.' . $this->enablecolumns[
'starttime'] .
'<=' .
$GLOBALS[
'EXEC_TIME'] .
')';
1166 if ($this->enablecolumns[
'endtime']) {
1167 $whereClause .=
' AND (' . $this->user_table .
'.' . $this->enablecolumns[
'endtime'] .
'=0 OR ' 1168 . $this->user_table .
'.' . $this->enablecolumns[
'endtime'] .
'>' .
$GLOBALS[
'EXEC_TIME'] .
')';
1170 return $whereClause;
1180 $statementClause = array(
1182 'parameters' => array()
1184 if ($this->lockIP) {
1185 $statementClause[
'where'] =
'AND ( 1186 ' . $this->session_table .
'.ses_iplock = :ses_iplock 1187 OR ' . $this->session_table .
'.ses_iplock=\'[DISABLED]\' 1189 $statementClause[
'parameters'] = array(
1193 return $statementClause;
1210 $IPparts = explode(
'.', $IP);
1211 for ($a = 4; $a > $parts; $a--) {
1212 unset($IPparts[$a - 1]);
1214 return implode(
'.', $IPparts);
1226 return substr(md5($this->
id .
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'encryptionKey']), 0, 10);
1268 if (is_array($this->user) && $this->user[$this->userid_column]) {
1269 if (!is_array($variable)) {
1272 if ($this->writeDevLog) {
1273 GeneralUtility::devLog(
'writeUC: ' . $this->userid_column .
'=' . (
int)$this->user[$this->userid_column],
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
1275 $this->db->exec_UPDATEquery($this->user_table, $this->userid_column .
'=' . (
int)$this->user[$this->userid_column], array(
'uc' => serialize($variable)));
1288 if (!$theUC && isset($this->user[
'uc'])) {
1289 $theUC = unserialize($this->user[
'uc']);
1291 if (is_array($theUC)) {
1308 $this->uc[
'moduleData'][
$module] = $data;
1324 if ($type !=
'ses' || (isset($this->uc[
'moduleSessionID'][
$module]) && $this->uc[
'moduleSessionID'][$module] == $this->
id)) {
1325 return $this->uc[
'moduleData'][
$module];
1339 $sesDat = unserialize($this->user[
'ses_data']);
1340 return $sesDat[$key];
1353 $sesDat = unserialize($this->user[
'ses_data']);
1354 $sesDat[$key] = $data;
1355 $this->user[
'ses_data'] = serialize($sesDat);
1356 if ($this->writeDevLog) {
1357 GeneralUtility::devLog(
'setAndSaveSessionData: ses_id = ' . $this->user[
'ses_id'],
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
1359 $this->db->exec_UPDATEquery($this->session_table,
'ses_id=' . $this->db->fullQuoteStr($this->user[
'ses_id'], $this->session_table), array(
'ses_data' => $this->user[
'ses_data']));
1375 $loginData = array();
1376 if ($this->getMethodEnabled) {
1388 if ($loginData[
'status'] ===
'login') {
1406 ? trim(
$GLOBALS[
'TYPO3_CONF_VARS'][$this->loginType][
'loginSecurityLevel'])
1408 $passwordTransmissionStrategy = $passwordTransmissionStrategy ?: $loginSecurityLevel;
1409 if ($this->writeDevLog) {
1415 $isLoginDataProcessed = FALSE;
1416 $processedLoginData = $loginData;
1418 $serviceChain .=
',' . $serviceObject->getServiceKey();
1419 $serviceObject->initAuth($subType, $loginData, $authInfo, $this);
1420 $serviceResult = $serviceObject->processLoginData($processedLoginData, $passwordTransmissionStrategy);
1421 if (!empty($serviceResult)) {
1422 $isLoginDataProcessed = TRUE;
1424 if ((
int)$serviceResult >= 200) {
1425 unset($serviceObject);
1429 unset($serviceObject);
1431 if ($isLoginDataProcessed) {
1432 $loginData = $processedLoginData;
1433 if ($this->writeDevLog) {
1448 $authInfo = array();
1462 if ($this->checkPid && $this->checkPid_value !== NULL) {
1464 $authInfo[
'db_user'][
'check_pid_clause'] =
' AND pid IN (' .
1465 $this->db->cleanIntList($this->checkPid_value) .
')';
1467 $authInfo[
'db_user'][
'checkPidList'] =
'';
1468 $authInfo[
'db_user'][
'check_pid_clause'] =
'';
1485 switch ($passwordCompareStrategy) {
1486 case 'superchallenged':
1490 if ($this->challengeStoredInCookie) {
1492 if ($_SESSION[
'login_challenge'] !== $loginData[
'chalvalue']) {
1493 if ($this->writeDevLog) {
1494 GeneralUtility::devLog(
'PHP Session stored challenge "' . $_SESSION[
'login_challenge'] .
'" and submitted challenge "' . $loginData[
'chalvalue'] .
'" did not match, so authentication failed!',
'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
1500 $compareStrategyHash = md5(
$user[$this->username_column] .
':' .
$user[$this->userident_column] .
':' . $loginData[
'chalvalue']);
1501 if ((
string)$loginData[(
'uident_' . $passwordCompareStrategy)] === $compareStrategyHash) {
1507 if ((
string)$loginData[
'uident_text'] !==
'' && (
string)$loginData[
'uident_text'] === (
string)
$user[$this->userident_column]) {
1522 $this->db->exec_DELETEquery($this->session_table,
'ses_tstamp < ' . (
int)(
$GLOBALS[
'EXEC_TIME'] - $this->gc_time) .
' AND ses_name = ' . $this->db->fullQuoteStr($this->name, $this->session_table));
1540 public function writelog($type, $action, $error, $details_nr, $details, $data, $tablename, $recuid, $recpid) {
1599 $dbres = $this->db->exec_SELECTquery(
'*', $this->user_table,
'uid=' . (
int)
$uid .
' ' . $this->
user_where_clause());
1601 $user = $this->db->sql_fetch_assoc($dbres);
1602 $this->db->sql_free_result($dbres);
1618 $dbres = $this->db->exec_SELECTquery(
'*', $this->user_table,
'username=' . $this->db->fullQuoteStr(
$name, $this->user_table) .
' ' . $this->
user_where_clause());
1620 $user = $this->db->sql_fetch_assoc($dbres);
1621 $this->db->sql_free_result($dbres);
1643 $usernameClause = $username ? $dbUser[
'username_column'] .
'=' . $this->db->fullQuoteStr($username, $dbUser[
'table']) :
'1=1';
1644 if ($username || $extraWhere) {
1646 $dbres = $this->db->exec_SELECTquery(
'*', $dbUser[
'table'], $usernameClause . $dbUser[
'check_pid_clause'] . $dbUser[
'enable_clause'] . $extraWhere);
1648 $user = $this->db->sql_fetch_assoc($dbres);
1649 $this->db->sql_free_result($dbres);
fetchUserRecord($dbUser, $username, $extraWhere='')
static getRandomHexString($count)
fetchUserSession($skipSessionUpdate=FALSE)
static devLog($msg, $extKey, $severity=0, $dataVar=FALSE)
compareUident($user, $loginData, $passwordCompareStrategy='')
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
static arrayToLogString(array $arr, $valueList=array(), $valueLength=20)
checkLogFailures($email, $secondsBack, $maxFailures)
hashLockClause_getHashInt()
static getIndpEnv($getEnvName)
static makeInstanceService($serviceType, $serviceSubType='', $excludeServiceKeys=array())
static lockRecords($table='', $uid=0, $pid=0)
getModuleData($module, $type='')
removeCookie($cookieName)
const SYSLOG_SEVERITY_ERROR
static getBackendScript($interface='')
$cookieWasSetOnCurrentRequest
static callUserFunction($funcName, &$params, &$ref, $checkPrefix='', $errorMode=0)
processLoginData($loginData, $passwordTransmissionStrategy='')
createUserSession($tempuser)
getNewSessionRecord($tempuser)
const SYSLOG_SEVERITY_WARNING
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
ipLockClause_remoteIPNumber($parts)
static redirect($url, $httpStatus=self::HTTP_STATUS_303)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
writelog($type, $action, $error, $details_nr, $details, $data, $tablename, $recuid, $recpid)
static inList($list, $item)
setAndSaveSessionData($key, $data)
isRefreshTimeBasedCookie()
pushModuleData($module, $data, $noSave=0)
isExistingSessionRecord($id)
static clientInfo($useragent='')