mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 13:11:31 +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
|
* 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.
|
* return false and if the hook doesn't care at all, if must return null.
|
||||||
*/
|
*/
|
||||||
$user = $this->callHook('authenticate');
|
if(!$user) {
|
||||||
if(false === $user) {
|
$user = $this->callHook('authenticate');
|
||||||
if(empty($this->errormsg))
|
if(false === $user) {
|
||||||
$this->setErrorMsg("authentication_failed");
|
if(empty($this->errormsg))
|
||||||
return false;
|
$this->setErrorMsg("authentication_failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Deprecated: Run any additional authentication implemented in a hook */
|
/* 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
|
/* Check for other restrictions which prevent the user from login, though
|
||||||
* the authentication was successfull.
|
* 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();
|
$userid = $user->getID();
|
||||||
if (($userid == $settings->_guestID) && (!$settings->_enableGuestLogin)) {
|
if (($userid == $settings->_guestID) && (!$settings->_enableGuestLogin)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user