mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
login as guest will prevent any other authentication
This commit is contained in:
parent
8e5e3ec4ea
commit
a03288ccf3
|
@ -71,11 +71,13 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
|
|||
* valid user, if the authentication succeeded. If it fails, it must
|
||||
* return false and if the hook doesn't care at all, if must return null.
|
||||
*/
|
||||
$user = $this->callHook('authenticate');
|
||||
if(false === $user) {
|
||||
if(empty($this->errormsg))
|
||||
$this->setErrorMsg("authentication_failed");
|
||||
return false;
|
||||
if(!$user) {
|
||||
$user = $this->callHook('authenticate');
|
||||
if(false === $user) {
|
||||
if(empty($this->errormsg))
|
||||
$this->setErrorMsg("authentication_failed");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Deprecated: Run any additional authentication implemented in a hook */
|
||||
|
@ -112,6 +114,9 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
|
|||
|
||||
/* Check for other restrictions which prevent the user from login, though
|
||||
* the authentication was successfull.
|
||||
* Checking for a guest login the second time, makes only sense if there are
|
||||
* more guest users and the login was done with a password and a user name
|
||||
* unequal to 'guest'.
|
||||
*/
|
||||
$userid = $user->getID();
|
||||
if (($userid == $settings->_guestID) && (!$settings->_enableGuestLogin)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user