add error control for openid on registration. fix #729

This commit is contained in:
Fabrixxm 2013-09-06 12:22:53 -04:00
parent 51d934ee70
commit be3111dc6f
1 changed files with 7 additions and 1 deletions

View 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
}