Skip to content

Node.js based forum software built for the modern web

fix: admin relogin

Barış Soner Uşaklıa5ef6b53b8aa
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js
index 7bf27139fd..bb3768169f 100644
--- a/src/controllers/authentication.js
+++ b/src/controllers/authentication.js
@@ -321,7 +321,7 @@ authenticationController.onSuccessfulLogin = async function (req, uid) {
* That behaviour is no longer required, onSuccessfulLogin is now automatically
* called in NodeBB core. However, if already called, return prematurely
*/
- if (req.loggedIn) {
+ if (req.loggedIn && !req.session.forceLogin) {
return true;
}