@@ -629,32 +629,6 @@ protected function preflight(): void
629629 ErrorHandler::fatalLang ('not_a_topic ' , false );
630630 }
631631
632- // Don't log if this is an attachment, avatar, toggle of editor buttons,
633- // theme option, XML feed, popup, etc.
634- if (
635- self ::$ current_action ?->canBeLogged() === true
636- || (
637- self ::$ current_action === null
638- && !QueryString::isFilteredRequest (self ::$ unlogged_actions , 'action ' )
639- )
640- ) {
641- // Log this user as online.
642- User::$ me ->logOnline ();
643-
644- // Track forum statistics and hits...?
645- if (!empty (Config::$ modSettings ['hitStats ' ])) {
646- Logging::trackStats (['hits ' => '+ ' ]);
647- }
648-
649- // Login cookies should only expire after a period of inactivity.
650- // Since doing something worthy of logging means this member is
651- // actively engaged with the forum right now, refresh their login
652- // cookie in order to reset the countdown to its expiry date.
653- if (!User::$ me ->is_guest ) {
654- Cookie::updateLoginCookieExpiry ();
655- }
656- }
657-
658632 // Make sure that our scheduled tasks have been running as intended.
659633 Config::checkCron ();
660634
@@ -682,6 +656,32 @@ protected function preflight(): void
682656 ) {
683657 User::$ me ->kickIfGuest (null , false );
684658 }
659+
660+ // Don't log if this is an attachment, avatar, toggle of editor buttons,
661+ // theme option, XML feed, popup, etc.
662+ if (
663+ self ::$ current_action ?->canBeLogged() === true
664+ || (
665+ self ::$ current_action === null
666+ && !QueryString::isFilteredRequest (self ::$ unlogged_actions , 'action ' )
667+ )
668+ ) {
669+ // Log this user as online.
670+ User::$ me ->logOnline ();
671+
672+ // Track forum statistics and hits...?
673+ if (!empty (Config::$ modSettings ['hitStats ' ])) {
674+ Logging::trackStats (['hits ' => '+ ' ]);
675+ }
676+
677+ // Login cookies should only expire after a period of inactivity.
678+ // Since doing something worthy of logging means this member is
679+ // actively engaged with the forum right now, refresh their login
680+ // cookie in order to reset the countdown to its expiry date.
681+ if (!User::$ me ->is_guest ) {
682+ Cookie::updateLoginCookieExpiry ();
683+ }
684+ }
685685 }
686686
687687 /**
0 commit comments