diff options
author | zotlabs <mike@macgirvin.com> | 2017-02-09 17:40:56 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-02-09 17:40:56 -0800 |
commit | fce33402e74f7ff6066ef859e7801a9201db28e1 (patch) | |
tree | 0361075c0608efeae91a5b686909047389ac21a0 /Zotlabs/Module/Profiles.php | |
parent | abadd0bd348bb21eabcc43ba7f893eb710e37dd5 (diff) | |
download | volse-hubzilla-fce33402e74f7ff6066ef859e7801a9201db28e1.tar.gz volse-hubzilla-fce33402e74f7ff6066ef859e7801a9201db28e1.tar.bz2 volse-hubzilla-fce33402e74f7ff6066ef859e7801a9201db28e1.zip |
use profile_store_lowlevel() when creating additional profiles
Diffstat (limited to 'Zotlabs/Module/Profiles.php')
-rw-r--r-- | Zotlabs/Module/Profiles.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index e166c3c19..32e888f14 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -70,15 +70,16 @@ class Profiles extends \Zotlabs\Web\Controller { $r1 = q("SELECT fullname, photo, thumb FROM profile WHERE uid = %d AND is_default = 1 LIMIT 1", intval(local_channel())); - $r2 = q("INSERT INTO profile (aid, uid , profile_guid, profile_name , fullname, photo, thumb) - VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s' )", - intval(get_account_id()), - intval(local_channel()), - dbesc(random_string()), - dbesc($name), - dbesc($r1[0]['fullname']), - dbesc($r1[0]['photo']), - dbesc($r1[0]['thumb']) + $r2 = profile_store_lowlevel( + [ + 'aid' => intval(get_account_id()), + 'uid' => intval(local_channel()), + 'profile_guid' => random_string(), + 'profile_name' => $name, + 'fullname' => $r1[0]['fullname'], + 'photo' => $r1[0]['photo'], + 'thumb' => $r1[0]['thumb'] + ] ); $r3 = q("SELECT id FROM profile WHERE uid = %d AND profile_name = '%s' LIMIT 1", |