check if configured guest user actually exists

This commit is contained in:
Uwe Steinmann 2019-02-05 07:34:48 +01:00
parent 1c75536791
commit a19db806cf

View File

@ -57,6 +57,10 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
*/
if(!$user && $settings->_enableGuestLogin && (int) $settings->_guestID) {
$guestUser = $dms->getUser((int) $settings->_guestID);
if(!$guestUser) {
$this->setErrorMsg("login_error_text");
return false;
}
if(($login != $guestUser->getLogin())) {
if ((!isset($pwd) || strlen($pwd)==0)) {
$this->setErrorMsg("login_error_text");