Browse Source

add error control for openid on registration. fix #729

pull/764/head
Fabrixxm 8 years ago
parent
commit
be3111dc6f
  1. 8
      include/user.php

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

Loading…
Cancel
Save