Module: nagvis Branch: master Commit: 3cf079826d8a0f2a0d765dbd7568f77e2f512f1f URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=3cf079826d8a0f2a0d765dbd7568f77e2f512f1f
Author: Lars Michelsen <[email protected]> Date: Sat May 1 19:42:18 2010 +0200 #219 remove logins which were made with another logon module than the currently configured one --- share/server/core/classes/CoreAuthHandler.php | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/share/server/core/classes/CoreAuthHandler.php b/share/server/core/classes/CoreAuthHandler.php index 10e8002..2ba01b8 100644 --- a/share/server/core/classes/CoreAuthHandler.php +++ b/share/server/core/classes/CoreAuthHandler.php @@ -147,6 +147,10 @@ class CoreAuthHandler { $bAlreadyAuthed = true; else $bAlreadyAuthed = false; + + // Remove logins which were performed with different logon modules + if($bAlreadyAuthed && $this->SESS->get('logonModule') != $this->CORE->getMainCfg()->getValue('global', 'logonmodule')) + $this->logout(); // When the user authenticated in trust mode read it here and override // the value handed over with the function call. @@ -159,6 +163,7 @@ class CoreAuthHandler { // Save success to session (only if this is no session auth) if($this->bIsAuthenticated === true && $this->sModuleName != 'CoreAuthModSession') { + $this->SESS->set('logonModule', $this->CORE->getMainCfg()->getValue('global', 'logonmodule')); $this->SESS->set('authCredentials', $this->getCredentials()); // Save that the user authenticated in trust mode @@ -170,9 +175,8 @@ class CoreAuthHandler { $ALOG->l('User logged in ('.$this->getUser().' / '.$this->getUserId().'): '.$this->sModuleName); } - if($ALOG !== null && $this->bIsAuthenticated === false && $this->sModuleName != 'CoreAuthModSession') { + if($ALOG !== null && $this->bIsAuthenticated === false && $this->sModuleName != 'CoreAuthModSession') $ALOG->l('User login failed ('.$this->getUser().' / '.$this->getUserId().'): '.$this->sModuleName); - } // Remove some maybe old data when not authenticated if($this->bIsAuthenticated === false && $this->SESS->isSetAndNotEmpty('authCredentials')) { ------------------------------------------------------------------------------ _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
