add error control for openid on registration. fix #729
This commit is contained in:
parent
51d934ee70
commit
be3111dc6f
|
@ -60,7 +60,13 @@ function create_user($arr) {
|
||||||
$openid->returnUrl = $a->get_baseurl() . '/openid';
|
$openid->returnUrl = $a->get_baseurl() . '/openid';
|
||||||
$openid->required = array('namePerson/friendly', 'contact/email', 'namePerson');
|
$openid->required = array('namePerson/friendly', 'contact/email', 'namePerson');
|
||||||
$openid->optional = array('namePerson/first','media/image/aspect11','media/image/default');
|
$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
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user