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 Nov 4, 2019
1 parent 433942f commit a2758d1
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 @@ -503,6 +503,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 @@ -518,7 +522,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 a2758d1

Please sign in to comment.