- تاریخ ثبتنام
- 2020-06-26
- نوشتهها
- 21,417
- راهحلها
- 27
- پسندها
- 3,264
- امتیازها
- 113
- سن
- 27
- محل سکونت
- England
- وب سایت
- xenforo.xyz
I have built this standalone script for logging in the user programmatically.
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);
$basePath = "/web/forum";
// Require the XenForo autoloader
require $basePath . '/src/XF.php';
// Initialize XenForo
XF::start($basePath);
// Set the user ID you want to log in
$userIdToLogin = 13; // Replace with the actual user ID
// Fetch the user
$user = XF::em()->find('XF:User', $userIdToLogin);
XF::app()->session()->set('sessionKey', 12345)...
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);
$basePath = "/web/forum";
// Require the XenForo autoloader
require $basePath . '/src/XF.php';
// Initialize XenForo
XF::start($basePath);
// Set the user ID you want to log in
$userIdToLogin = 13; // Replace with the actual user ID
// Fetch the user
$user = XF::em()->find('XF:User', $userIdToLogin);
XF::app()->session()->set('sessionKey', 12345)...
نام موضوع : Error: The session key must be overridden.