aboutsummaryrefslogtreecommitdiffstats
path: root/include/identity.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2013-08-21 22:19:38 +0200
committerChristian Vogeley <christian.vogeley@hotmail.de>2013-08-21 22:19:38 +0200
commit056ed00a4cea6175eb57781569a77648ce7d3382 (patch)
tree5b5a4f3469bb8fb6b3d3368795ed60d8a6441682 /include/identity.php
parenta944a879b1e6ebd8b3d278b86ea4404ba5b7aa81 (diff)
parentd8ef1417fb2ff8d736e4392c118c51c63dc66b1d (diff)
downloadvolse-hubzilla-056ed00a4cea6175eb57781569a77648ce7d3382.tar.gz
volse-hubzilla-056ed00a4cea6175eb57781569a77648ce7d3382.tar.bz2
volse-hubzilla-056ed00a4cea6175eb57781569a77648ce7d3382.zip
Merge remote-tracking branch 'upstream/master'
Update
Diffstat (limited to 'include/identity.php')
-rw-r--r--include/identity.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/identity.php b/include/identity.php
index 99b90cc8b..5f210c456 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -115,11 +115,19 @@ function create_identity($arr) {
if(array_key_exists('primary', $arr))
$primary = intval($arr['primary']);
+ $perms_sql = '';
+
+ $defperms = site_default_perms();
+ $global_perms = get_perms();
+ foreach($defperms as $p => $v) {
+ $perms_keys .= ', ' . $global_perms[$p][0];
+ $perms_vals .= ', ' . intval($v);
+ }
$r = q("insert into channel ( channel_account_id, channel_primary,
channel_name, channel_address, channel_guid, channel_guid_sig,
- channel_hash, channel_prvkey, channel_pubkey, channel_pageflags )
- values ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d ) ",
+ channel_hash, channel_prvkey, channel_pubkey, channel_pageflags $perms_keys )
+ values ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d $perms_vals ) ",
intval($arr['account_id']),
intval($primary),
@@ -133,6 +141,9 @@ function create_identity($arr) {
intval($pageflags)
);
+
+
+
$r = q("select * from channel where channel_account_id = %d
and channel_guid = '%s' limit 1",
intval($arr['account_id']),