]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
handle errors in authorizing and saving remote profile
authorEvan Prodromou <evan@prodromou.name>
Fri, 6 Jun 2008 05:26:31 +0000 (01:26 -0400)
committerEvan Prodromou <evan@prodromou.name>
Fri, 6 Jun 2008 05:26:31 +0000 (01:26 -0400)
darcs-hash:20080606052631-84dde-4a8b4d8f70b0148d0b98b62875099f7d9cca9026.gz

actions/userauthorization.php

index eb93b6fd301d06a77e3beb8b9bac16eb328a5949..c6d4bed4ef3be525b74f6e81fcbc2174d60fa921 100644 (file)
@@ -132,8 +132,12 @@ class UserauthorizationAction extends Action {
                $callback = $req->get_parameter('oauth_callback');
 
                if ($this->arg('accept')) {
-                       $this->authorize_token($req);
-                       $this->save_remote_profile($req);
+                       if (!$this->authorize_token($req)) {
+                               common_server_error(_t('Error authorizing token'));
+                       }
+                       if (!$this->save_remote_profile($req)) {
+                               common_server_error(_t('Error saving remote profile'));
+                       }
                        if (!$callback) {
                                $this->show_accept_message($req->get_parameter('oauth_token'));
                        } else {