From: Fabrixxm <fabrix.xm@gmail.com>
Date: Fri, 6 Sep 2013 16:22:53 +0000 (-0400)
Subject: add error control for openid on registration. fix #729
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be3111dc6f3d0a4a6ee5662d3551c7fb8e9bac58;p=friendica.git

add error control for openid on registration. fix #729
---

diff --git a/include/user.php b/include/user.php
index 6f4ab30215..220d3d8c8b 100644
--- a/include/user.php
+++ b/include/user.php
@@ -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	
 		}