aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Regate.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-08 12:38:38 +0000
committerMario <mario@mariovavti.com>2021-04-08 12:38:38 +0000
commitcf62e07bec8ffe6b9e5c92d56c13ee3cbe06b5bf (patch)
treef9842fdf61038c023bd6088576f40f893850256c /Zotlabs/Module/Regate.php
parentec4526b5f47af05bc0ffe0bb5f997d3d82b14b5a (diff)
downloadvolse-hubzilla-cf62e07bec8ffe6b9e5c92d56c13ee3cbe06b5bf.tar.gz
volse-hubzilla-cf62e07bec8ffe6b9e5c92d56c13ee3cbe06b5bf.tar.bz2
volse-hubzilla-cf62e07bec8ffe6b9e5c92d56c13ee3cbe06b5bf.zip
register: default to auto-create channel and fix auto create channel if register approval is configured
Diffstat (limited to 'Zotlabs/Module/Regate.php')
-rw-r--r--Zotlabs/Module/Regate.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php
index d51927de1..6d9d5dc28 100644
--- a/Zotlabs/Module/Regate.php
+++ b/Zotlabs/Module/Regate.php
@@ -139,18 +139,22 @@ class Regate extends \Zotlabs\Web\Controller {
// zar_log($msg . ':' . print_r($cra, true));
zar_log($msg . ' ' . $cra['account']['account_email']
. ' ' . $cra['account']['account_language']);
+
$nextpage = 'new_channel';
- $auto_create = (get_config('system','auto_channel_create') ? true : false);
+ $auto_create = get_config('system','auto_channel_create',1);
if($auto_create) {
// prepare channel creation
if($reonar['chan.name'])
- set_aconfig($cra['account']['account_id'],
- 'register','channel_name',$reonar['chan.name']);
+ set_aconfig($cra['account']['account_id'], 'register', 'channel_name', $reonar['chan.name']);
+
if($reonar['chan.did1'])
- set_aconfig($cra['account']['account_id'],
- 'register','channel_address',$reonar['chan.did1']);
+ set_aconfig($cra['account']['account_id'], 'register', 'channel_address', $reonar['chan.did1']);
+
+ $permissions_role = get_config('system','default_permissions_role');
+ if($permissions_role)
+ set_aconfig($cra['account']['account_id'], 'register', 'permissions_role', $permissions_role);
}
authenticate_success($cra['account'],null,true,false,true);