diff --git a/class.openid.plugin.php b/class.openid.plugin.php index 91ebf458b0f..cd729126af8 100644 --- a/class.openid.plugin.php +++ b/class.openid.plugin.php @@ -117,8 +117,14 @@ public function Base_ConnectData_Handler($Sender, $Args) { return; // this will error out $this->EventArguments = $Args; - $OpenID = $this->GetOpenID(); - if ($OpenID->validate()) { + + // Check session before retrieving + $Session = Gdn::Session(); + $OpenID = $Session->Stash('OpenID', '', FALSE); + if (!$OpenID) + $OpenID = $this->GetOpenID(); + + if ($Session->Stash('OpenID', '', FALSE) || $OpenID->validate()) { $Attr = $OpenID->getAttributes(); $Form = $Sender->Form; //new Gdn_Form(); @@ -129,6 +135,7 @@ public function Base_ConnectData_Handler($Sender, $Args) { $Form->SetFormValue('FullName', GetValue('namePerson/first', $Attr).' '.GetValue('namePerson/last', $Attr)); $Form->SetFormValue('Email', GetValue('contact/email', $Attr)); $Sender->SetData('Verified', TRUE); + $Session->Stash('OpenID', $OpenID); } }