aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-08-21 18:51:25 -0700
committerzotlabs <mike@macgirvin.com>2019-08-21 18:51:25 -0700
commit8c96032b2bdef07795e6f2ba6e9312e0ebc9320f (patch)
tree9e29cb6195233c80505e6594faa303ead6c5ac3e /include
parentd2565519070255af7f127c90b4dadef9c24328f8 (diff)
parentac05a2ede7023495618b316635b93274416b69d8 (diff)
downloadvolse-hubzilla-8c96032b2bdef07795e6f2ba6e9312e0ebc9320f.tar.gz
volse-hubzilla-8c96032b2bdef07795e6f2ba6e9312e0ebc9320f.tar.bz2
volse-hubzilla-8c96032b2bdef07795e6f2ba6e9312e0ebc9320f.zip
Merge branch 'dev' of https://framagit.org/zot/core into dev
Diffstat (limited to 'include')
-rw-r--r--include/channel.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/channel.php b/include/channel.php
index 0280cd1cd..7c0397e11 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1262,7 +1262,7 @@ function channel_export_items_page($channel_id, $start, $finish, $page = 0, $lim
*/
function profile_load($nickname, $profile = '') {
-// logger('profile_load: ' . $nickname . (($profile) ? ' profile: ' . $profile : ''));
+ //logger('profile_load: ' . $nickname . (($profile) ? ' profile: ' . $profile : ''));
$user = q("select channel_id from channel where channel_address = '%s' and channel_removed = 0 limit 1",
dbesc($nickname)
@@ -1303,6 +1303,14 @@ function profile_load($nickname, $profile = '') {
dbesc($nickname),
dbesc($profile)
);
+ if (! $p) {
+ $p = q("SELECT profile.uid AS profile_uid, profile.*, channel.* FROM profile
+ LEFT JOIN channel ON profile.uid = channel.channel_id
+ WHERE channel.channel_address = '%s' AND profile.id = %d LIMIT 1",
+ dbesc($nickname),
+ intval($profile)
+ );
+ }
}
if(! $p) {