Jelajahi Sumber

Fix invalid user (#4081)

#fix https://github.com/FreshRSS/FreshRSS/issues/4080
Initialise the default user to be able to display the error page
Alexandre Alapetite 4 tahun lalu
induk
melakukan
20c8382c25
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      app/Controllers/authController.php

+ 2 - 1
app/Controllers/authController.php

@@ -125,7 +125,8 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
 
 
 			FreshRSS_Context::initUser($username);
 			FreshRSS_Context::initUser($username);
 			if (FreshRSS_Context::$user_conf == null) {
 			if (FreshRSS_Context::$user_conf == null) {
-				//We do not test here whether the user exists, so most likely an internal error.
+				// Initialise the default user to be able to display the error page
+				FreshRSS_Context::initUser(FreshRSS_Context::$system_conf->default_user);
 				Minz_Error::error(403, array(_t('feedback.auth.login.invalid')), false);
 				Minz_Error::error(403, array(_t('feedback.auth.login.invalid')), false);
 				return;
 				return;
 			}
 			}