aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Regate.php
diff options
context:
space:
mode:
authorHilmar R <u02@u29lx193>2021-01-24 20:59:11 +0100
committerHilmar R <u02@u29lx193>2021-01-24 20:59:11 +0100
commit3f031399cb900650b6a59b9d2b5706b1c5c1afde (patch)
tree4ea110c808d7502a3174ccbb98b305004fdcf6c3 /Zotlabs/Module/Regate.php
parent0a16674f6e6b96b99b1bc004a62684b7cc2a4694 (diff)
downloadvolse-hubzilla-3f031399cb900650b6a59b9d2b5706b1c5c1afde.tar.gz
volse-hubzilla-3f031399cb900650b6a59b9d2b5706b1c5c1afde.tar.bz2
volse-hubzilla-3f031399cb900650b6a59b9d2b5706b1c5c1afde.zip
auto channel create adjustments
Diffstat (limited to 'Zotlabs/Module/Regate.php')
-rw-r--r--Zotlabs/Module/Regate.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php
index eabc1459e..f96796e8a 100644
--- a/Zotlabs/Module/Regate.php
+++ b/Zotlabs/Module/Regate.php
@@ -137,10 +137,10 @@ class Regate extends \Zotlabs\Web\Controller {
. ' ' . $cra['account']['account_language']);
$nextpage = 'new_channel';
- /* oops, ffu perhaps
$auto_create = (get_config('system','auto_channel_create') ? true : false);
if($auto_create) {
+ // prepare channel creation
if($reonar['chan.name'])
set_aconfig($cra['account']['account_id'],
'register','channel_name',$reonar['chan.name']);
@@ -148,30 +148,29 @@ class Regate extends \Zotlabs\Web\Controller {
set_aconfig($cra['account']['account_id'],
'register','channel_address',$reonar['chan.did1']);
}
- */
+
authenticate_success($cra['account'],null,true,false,true);
- /* oops, ffu perhaps
if($auto_create) {
+ // create channel
$new_channel = auto_channel_create($cra['account']['account_id']);
+
if($new_channel['success']) {
$channel_id = $new_channel['channel']['channel_id'];
change_channel($channel_id);
$nextpage = 'profiles/' . $channel_id;
+ $msg = 'ZAR1239I ' . t('Channel successfull created') . ' ' . $did2;
}
else {
- zar_log($new_channel['message']
- . ', ' . $reonar['chan.did1']
- . ', ' . $reonar['chan.name']
- );
+ $msg = 'ZAR1239E ' . $new_channel['message'] . ' ' . $did2;
}
+ zar_log($msg . ' ' . $reonar['chan.did1'] . ' (' . $reonar['chan.name'] . ')');
}
- */
unset($_SESSION['login_return_url']);
}
else {
q("ROLLBACK");
- $msg = 'ZAR1239E ' . t('Account creation error');
+ $msg = 'ZAR1238E ' . t('Account creation error');
zar_log($msg . ':' . print_r($cra, true));
}
}