Skip to content

Commit

Permalink
avoid the admin being kicked out after upgrade (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
michield committed Apr 12, 2024
1 parent 4262a2c commit 8428683
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public_html/lists/admin/upgrade.php
Expand Up @@ -337,6 +337,10 @@ function output($message)
if (!Sql_Table_exists($GLOBALS['tables']['admin_login'])) {
cl_output(s('Creating new table "admin_login"'));
createTable('admin_login');
## add an entry for current admin to avoid being kicked out
Sql_Query(sprintf('insert into %s (moment,adminid,remote_ip4,remote_ip6,sessionid,active)
values(%d,%d,"%s","%s","%s",1)',
$GLOBALS['tables']['admin_login'],time(),$_SESSION['logindetails']['id'],$_SESSION['adminloggedin'],"",session_id()));
}
if (version_compare($dbversion, '3.6.15', '<')) {
// Ensure timestamp field does not have null values then give explicit defaults
Expand Down

0 comments on commit 8428683

Please sign in to comment.