]> git.mxchange.org Git - friendica.git/commitdiff
add error control for openid on registration. fix #729
authorFabrixxm <fabrix.xm@gmail.com>
Fri, 6 Sep 2013 16:22:53 +0000 (12:22 -0400)
committerFabrixxm <fabrix.xm@gmail.com>
Fri, 6 Sep 2013 16:22:53 +0000 (12:22 -0400)
include/user.php

index 6f4ab30215a109f3187b14061831b96b95523bbc..220d3d8c8b628a5abf65a51ca4e8361a27dde4d1 100644 (file)
@@ -60,7 +60,13 @@ function create_user($arr) {
                        $openid->returnUrl = $a->get_baseurl() . '/openid'; 
                        $openid->required = array('namePerson/friendly', 'contact/email', 'namePerson');
                        $openid->optional = array('namePerson/first','media/image/aspect11','media/image/default');
-                       goaway($openid->authUrl());
+                       try {                   
+                               $authurl = $openid->authUrl();
+                       } catch (Exception $e){
+                               $result['message'] .= t('Error:').$e->getMessage() . EOL . t('Check your OpenID url') . EOL;
+                               return $result;
+                       }
+                       goaway($authurl);
                        // NOTREACHED   
                }