Skip to content

Commit

Permalink
Rely only on moodle registered shutdown handlers to save the session (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood authored and danmarsden committed May 9, 2019
1 parent 898ae71 commit 9fb330b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion extlib/simplesamlphp/lib/SimpleSAML/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,10 @@ public function markDirty()

$this->dirty = true;

// Moodle auth_saml2 hack, because we register a shutdown handler in
// moodle in the constructor we don't need to register a callback here.
return;

if ($this->callback_registered) {
// we already have a shutdown callback registered for this object, no need to add another one
return;
Expand All @@ -504,7 +508,9 @@ public function markDirty()
*/
public function __destruct()
{
$this->save();
// Moodle auth_saml2 hack, we don't need to save here because we have
// a custom shutdown handle registered with moodle.
// $this->save();
}

/**
Expand Down

0 comments on commit 9fb330b

Please sign in to comment.