<!-- Preparations for the new session system. -->
<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.4_session_1_cookies.php</instruction>
<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.4_session_2_user_session.php</instruction>
+ <!-- TODO: Copy the current ACP session into a frontend session. -->
<!-- New application code. -->
<instruction type="file" skipStyleUpdate="true" />
// 1) Check whether the cookies are already in place.
$hasValidSessionCookie = false;
-if (!empty($_COOKIE[COOKIE_PREFIX."acp_session"])) {
- $cookieValue = CryptoUtil::getValueFromSignedString($_COOKIE[COOKIE_PREFIX."acp_session"]);
+if (!empty($_COOKIE[COOKIE_PREFIX."user_session"])) {
+ $cookieValue = CryptoUtil::getValueFromSignedString($_COOKIE[COOKIE_PREFIX."user_session"]);
if ($cookieValue && \mb_strlen($cookieValue, '8bit') === 26) {
$sessionID = \bin2hex(\mb_substr($cookieValue, 1, 20, '8bit'));
if ($sessionID === WCF::getSession()->sessionID) {
// 2) Set new session cookie.
HeaderUtil::setCookie(
- "acp_session",
+ "user_session",
CryptoUtil::createSignedString(
\pack(
'CA20CN',
use wcf\system\user\storage\UserStorageHandler;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
-use wcf\system\WCFACP;
use wcf\util\CryptoUtil;
use wcf\util\HeaderUtil;
use wcf\util\UserUtil;
* @inheritDoc
*/
protected function init() {
- $this->isACP = (class_exists(WCFACP::class, false) || !PACKAGE_ID);
+ $this->isACP = false;
$this->usersOnlyPermissions = UserGroupOptionCacheBuilder::getInstance()->getData([], 'usersOnlyOptions');
}