Commit f6823513 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #27 in ZP/z-push from...

Merge pull request #27 in ZP/z-push from bugfix/ZP-664-backendcombined-don-t-execute-logoff to develop

* commit '595ae7c5':
  ZP-664 Don't execute Logoff if not needed. Released under the Affero GNU General Public License (AGPL) version 3.

(cherry picked from commit 669dbd1e)
parent 6c60c960
......@@ -62,6 +62,7 @@ class BackendCombined extends Backend {
public $backends;
private $activeBackend;
private $activeBackendID;
private $logon_done = false;
/**
* Constructor of the combined backend
......@@ -116,6 +117,8 @@ class BackendCombined extends Backend {
return false;
}
}
$this->logon_done = true;
ZLog::Write(LOGLEVEL_INFO, "Combined->Logon() success");
return true;
}
......@@ -165,6 +168,10 @@ class BackendCombined extends Backend {
* @return boolean
*/
public function Logoff() {
// If no Logon in done, omit Logoff
if (!$this->logon_done)
return true;
ZLog::Write(LOGLEVEL_DEBUG, "Combined->Logoff()");
foreach ($this->backends as $i => $b){
$this->backends[$i]->Logoff();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment