aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings/Channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Settings/Channel.php')
-rw-r--r--Zotlabs/Module/Settings/Channel.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index a89d83544..9ea459dab 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -88,15 +88,17 @@ class Channel {
intval(local_channel())
);
}
-
- $x = \Zotlabs\Access\Permissions::FilledPerms($role_permissions['perms_connect']);
- foreach($x as $k => $v) {
- set_abconfig(local_channel(),$channel['channel_hash'],'my_perms',$k, $v);
- if($role_permissions['perms_auto']) {
- set_pconfig(local_channel(),'autoperms',$k,$v);
- }
- else {
- del_pconfig(local_channel(),'autoperms',$k);
+
+ if($role_permissions['perms_connect']) {
+ $x = \Zotlabs\Access\Permissions::FilledPerms($role_permissions['perms_connect']);
+ foreach($x as $k => $v) {
+ set_abconfig(local_channel(),$channel['channel_hash'],'my_perms',$k, $v);
+ if($role_permissions['perms_auto']) {
+ set_pconfig(local_channel(),'autoperms',$k,$v);
+ }
+ else {
+ del_pconfig(local_channel(),'autoperms',$k);
+ }
}
}