X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffinishaddopenid.php;h=54d81b0b4e538efd0ba3c60d43f7d22566daaf53;hb=f26ed4626641d934eb8be8359bcc4aef03c97968;hp=49e54a34fc5028332709b18404475c575600b8d9;hpb=87b494f1ebbe7640d194ef322af12fdf378295df;p=quix0rs-gnu-social.git diff --git a/actions/finishaddopenid.php b/actions/finishaddopenid.php index 49e54a34fc..54d81b0b4e 100644 --- a/actions/finishaddopenid.php +++ b/actions/finishaddopenid.php @@ -31,7 +31,7 @@ class FinishaddopenidAction extends Action { $this->try_login(); } } - + function try_login() { $consumer =& oid_consumer(); @@ -45,7 +45,7 @@ class FinishaddopenidAction extends Action { // Authentication failed; display the error message. $this->message(sprintf(_('OpenID authentication failed: %s'), $response->message)); } else if ($response->status == Auth_OpenID_SUCCESS) { - + $display = $response->getDisplayIdentifier(); $canonical = ($response->endpoint && $response->endpoint->canonicalID) ? $response->endpoint->canonicalID : $display; @@ -58,7 +58,7 @@ class FinishaddopenidAction extends Action { $cur =& common_current_user(); $other = oid_get_user($canonical); - + if ($other) { if ($other->id == $cur->id) { $this->message(_('You already have this OpenID!')); @@ -69,11 +69,11 @@ class FinishaddopenidAction extends Action { } # start a transaction - + $cur->query('BEGIN'); - + $result = oid_link_user($cur->id, $canonical, $display); - + if (!$result) { $this->message(_('Error connecting user.')); return; @@ -84,13 +84,13 @@ class FinishaddopenidAction extends Action { return; } } - + # success! - + $cur->query('COMMIT'); oid_set_last($display); - + common_redirect(common_local_url('openidsettings')); } }