diff options
author | Mario <mario@mariovavti.com> | 2019-06-26 09:21:22 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-06-26 09:21:22 +0200 |
commit | 40bbdfdf6ac53b04d723881d91f8ea12999d97af (patch) | |
tree | 40b7386ba354c8d0eadceee1e0dd9399a395cf27 /include | |
parent | ad8ad0ccd78db4f33c308a183809883cd4002a5c (diff) | |
parent | 4f280b5497325c7e7389096cb39f1f409de2638c (diff) | |
download | volse-hubzilla-40bbdfdf6ac53b04d723881d91f8ea12999d97af.tar.gz volse-hubzilla-40bbdfdf6ac53b04d723881d91f8ea12999d97af.tar.bz2 volse-hubzilla-40bbdfdf6ac53b04d723881d91f8ea12999d97af.zip |
Merge branch 'dev' into 'dev'
provide auto redirect from zot6 /item permalinks
See merge request hubzilla/core!1684
Diffstat (limited to 'include')
-rw-r--r-- | include/api_auth.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/api_auth.php b/include/api_auth.php index 23ab9c946..9235bd28c 100644 --- a/include/api_auth.php +++ b/include/api_auth.php @@ -96,11 +96,15 @@ function api_login(&$a){ if($sigblock) { $keyId = str_replace('acct:','',$sigblock['keyId']); if($keyId) { - $r = q("select * from hubloc where hubloc_addr = '%s' limit 1", + $r = q("select * from hubloc where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) limit 1", + dbesc($keyId), dbesc($keyId) ); if($r) { $c = channelx_by_hash($r[0]['hubloc_hash']); + if (! $c) { + $c = channelx_by_portid($r[0]['hubloc_hash']); + } if($c) { $a = q("select * from account where account_id = %d limit 1", intval($c['channel_account_id']) |