aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-05 17:31:20 -0700
committerzotlabs <mike@macgirvin.com>2018-04-05 17:31:20 -0700
commitf4c94ab121167ac34e550939f032e9982d69307b (patch)
treeec6b3f931e070837ea518e25a3f98d984c19950c /include/zot.php
parent64bb1ca2bbc18e044d360a4bc7da01740c26f818 (diff)
downloadvolse-hubzilla-f4c94ab121167ac34e550939f032e9982d69307b.tar.gz
volse-hubzilla-f4c94ab121167ac34e550939f032e9982d69307b.tar.bz2
volse-hubzilla-f4c94ab121167ac34e550939f032e9982d69307b.zip
use profile_store_lowlevel() when importing profile structures to ensure all non-null fields are present
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index 25ea9b8fb..2ad43f0e5 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3855,11 +3855,14 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
intval($channel['channel_id'])
);
if(! $x) {
- q("insert into profile ( profile_guid, aid, uid ) values ('%s', %d, %d)",
- dbesc($profile['profile_guid']),
- intval($channel['channel_account_id']),
- intval($channel['channel_id'])
+ profile_store_lowlevel(
+ [
+ 'aid' => $channel['channel_account_id'],
+ 'uid' => $channel['channel_id'],
+ 'profile_guid' => $profile['profile_guid'],
+ ]
);
+
$x = q("select * from profile where profile_guid = '%s' and uid = %d limit 1",
dbesc($profile['profile_guid']),
intval($channel['channel_id'])