Browse Source

OpenId possibly fixed:

- The LightOpenId class' constructor now requires the hostname from where the
  requested started, added it now
- sometimes need to invoke get_app() as $a was not around

Signed-off-by: Roland Häder <roland@mxchange.org>
pull/5068/head
Roland Häder 3 years ago
parent
commit
6129eb1623
No known key found for this signature in database GPG Key ID: B72F8185C6C7BD78
  1. 2
      mod/openid.php
  2. 2
      mod/settings.php
  3. 2
      src/Model/User.php
  4. 3
      src/Module/Login.php

2
mod/openid.php

@ -19,7 +19,7 @@ function openid_content(App $a) {
if((x($_GET,'openid_mode')) && (x($_SESSION,'openid'))) {
$openid = new LightOpenID;
$openid = new LightOpenID($a->get_hostname());
if($openid->validate()) {

2
mod/settings.php

@ -543,7 +543,7 @@ function settings_post(App $a)
if ($openid != $a->user['openid'] || (strlen($openid) && (!strlen($openidserver)))) {
if (Network::isUrlValid($openid)) {
logger('updating openidserver');
$open_id_obj = new LightOpenID;
$open_id_obj = new LightOpenID($a->get_hostname());
$open_id_obj->identity = $openid;
$openidserver = $open_id_obj->discover($open_id_obj->identity);
} else {

2
src/Model/User.php

@ -359,7 +359,7 @@ class User
$_SESSION['register'] = 1;
$_SESSION['openid'] = $openid_url;
$openid = new LightOpenID;
$openid = new LightOpenID($a->get_hostname());
$openid->identity = $openid_url;
$openid->returnUrl = System::baseUrl() . '/openid';
$openid->required = ['namePerson/friendly', 'contact/email', 'namePerson'];

3
src/Module/Login.php

@ -90,7 +90,8 @@ class Login extends BaseModule
// Otherwise it's probably an openid.
try {
$openid = new LightOpenID;
$a = get_app();
$openid = new LightOpenID($a->get_hostname());
$openid->identity = $openid_url;
$_SESSION['openid'] = $openid_url;
$_SESSION['remember'] = $remember;

Loading…
Cancel
Save