aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-03 02:47:36 -0700
committerfriendica <info@friendica.com>2013-07-03 02:47:36 -0700
commitc16b65b5bd7f5a43647523ef9dd351a9edb17fde (patch)
tree8f6e31fa7939c2dde80781fc3683813d2dfc0168 /boot.php
parent8369a8a7559391ea6cb2757b5093bcf47aed0ed1 (diff)
downloadvolse-hubzilla-c16b65b5bd7f5a43647523ef9dd351a9edb17fde.tar.gz
volse-hubzilla-c16b65b5bd7f5a43647523ef9dd351a9edb17fde.tar.bz2
volse-hubzilla-c16b65b5bd7f5a43647523ef9dd351a9edb17fde.zip
multi-profiles work
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index dc0ec48a5..e11327d69 100755
--- a/boot.php
+++ b/boot.php
@@ -1438,6 +1438,8 @@ function get_max_import_size() {
function profile_load(&$a, $nickname, $profile = '') {
+ logger('profile_load: ' . $profile);
+
$user = q("select channel_id from channel where channel_address = '%s' limit 1",
dbesc($nickname)
);
@@ -1460,12 +1462,13 @@ function profile_load(&$a, $nickname, $profile = '') {
return;
}
- $r = q("SELECT abook_profile FROM abook WHERE abook_xchan = '%s' limit 1",
- dbesc($observer['xchan_hash'])
- );
- if($r)
- $profile = $r[0]['abook_profile'];
-
+ if(! $profile) {
+ $r = q("SELECT abook_profile FROM abook WHERE abook_xchan = '%s' limit 1",
+ dbesc($observer['xchan_hash'])
+ );
+ if($r)
+ $profile = $r[0]['abook_profile'];
+ }
$r = null;
if($profile) {