use profile_store_lowlevel() when importing profile structures to ensure all non-null fields are present
This commit is contained in:
parent
64bb1ca2bb
commit
f4c94ab121
@ -180,7 +180,7 @@ function import_profiles($channel, $profiles) {
|
|||||||
$profile['thumb'] = z_root() . '/photo/' . basename($profile['thumb']);
|
$profile['thumb'] = z_root() . '/photo/' . basename($profile['thumb']);
|
||||||
}
|
}
|
||||||
|
|
||||||
create_table_from_array('profile', $profile);
|
profile_store_lowlevel($profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3855,11 +3855,14 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
|||||||
intval($channel['channel_id'])
|
intval($channel['channel_id'])
|
||||||
);
|
);
|
||||||
if(! $x) {
|
if(! $x) {
|
||||||
q("insert into profile ( profile_guid, aid, uid ) values ('%s', %d, %d)",
|
profile_store_lowlevel(
|
||||||
dbesc($profile['profile_guid']),
|
[
|
||||||
intval($channel['channel_account_id']),
|
'aid' => $channel['channel_account_id'],
|
||||||
intval($channel['channel_id'])
|
'uid' => $channel['channel_id'],
|
||||||
|
'profile_guid' => $profile['profile_guid'],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$x = q("select * from profile where profile_guid = '%s' and uid = %d limit 1",
|
$x = q("select * from profile where profile_guid = '%s' and uid = %d limit 1",
|
||||||
dbesc($profile['profile_guid']),
|
dbesc($profile['profile_guid']),
|
||||||
intval($channel['channel_id'])
|
intval($channel['channel_id'])
|
||||||
|
Reference in New Issue
Block a user