98 throw new \TYPO3\CMS\Core\Error\Exception(
'A back-end form protection may only be instantiated if there' .
' is an active back-end session.', 1285067843);
100 $this->backendUser =
$GLOBALS[
'BE_USER'];
111 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
112 $this->
getLanguageService()->sL(
'LLL:EXT:lang/locallang_core.xlf:error.formProtection.tokenInvalid'),
114 \
TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
119 'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService' 122 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
123 $defaultFlashMessageQueue->enqueue($flashMessage);
132 return (
bool)(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX);
141 $this->sessionToken = $this->backendUser->getSessionData(
'formSessionToken');
142 if (empty($this->sessionToken)) {
157 $this->backendUser->setAndSaveSessionData(
'formSessionToken', $this->sessionToken);
169 $this->sessionToken = $this->
getRegistry()->get(
'core',
'formSessionToken:' . $this->backendUser->user[
'uid']);
170 if (empty($this->sessionToken)) {
171 throw new \UnexpectedValueException(
'Failed to restore the session token from the registry.', 1301827270);
184 $this->
getRegistry()->set(
'core',
'formSessionToken:' . $this->backendUser->user[
'uid'], $this->getSessionToken());
193 $this->
getRegistry()->remove(
'core',
'formSessionToken:' . $this->backendUser->user[
'uid']);
225 return isset(
$GLOBALS[
'BE_USER']) &&
$GLOBALS[
'BE_USER'] instanceof \TYPO3\CMS\Core\Authentication\BackendUserAuthentication && isset(
$GLOBALS[
'BE_USER']->user[
'uid']);
static makeInstance($className)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]