aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-14 19:40:51 +0000
committerMario <mario@mariovavti.com>2021-04-14 19:40:51 +0000
commite35ab97b7ecbd96e11883bc194bfe9fb5a72e7f2 (patch)
tree08e00e224e345feee95bb0a3f668aa5a4d1ef580 /Zotlabs
parentf9793e870f5c3c531fe48a2294782de0643a6c9b (diff)
downloadvolse-hubzilla-e35ab97b7ecbd96e11883bc194bfe9fb5a72e7f2.tar.gz
volse-hubzilla-e35ab97b7ecbd96e11883bc194bfe9fb5a72e7f2.tar.bz2
volse-hubzilla-e35ab97b7ecbd96e11883bc194bfe9fb5a72e7f2.zip
register: provide a possibility to leave a message id registration is by approval
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Admin/Accounts.php13
-rw-r--r--Zotlabs/Module/Regate.php1
-rw-r--r--Zotlabs/Module/Register.php15
3 files changed, 21 insertions, 8 deletions
diff --git a/Zotlabs/Module/Admin/Accounts.php b/Zotlabs/Module/Admin/Accounts.php
index 9971fd213..0c0725bd2 100644
--- a/Zotlabs/Module/Admin/Accounts.php
+++ b/Zotlabs/Module/Admin/Accounts.php
@@ -218,10 +218,15 @@ class Accounts {
$tao .= 'tao.zar.zarar = {';
foreach ($pending as $n => $v) {
- $pending[$n]['status'] = t('Verified');
+ $stuff = json_decode($v['reg_stuff'], true);
+
+ if(isset($stuff['msg'])) {
+ $pending[$n]['msg'] = $stuff['msg'];
+ }
if (array_key_exists($v['reg_atip'], $atipn)) {
- $pending[$n]['reg_atip'] = $v['reg_atip'] . ' ◄' . $atipn[ $v['reg_atip'] ] . '×';
+ $pending[$n]['reg_atip'] = $v['reg_atip'];
+ $pending[$n]['reg_atip_n'] = $atipn[$v['reg_atip']];
}
// timezone adjust date_time for display
@@ -293,8 +298,8 @@ class Accounts {
'$sel_tall' => t('Select toggle'),
'$sel_deny' => t('Deny selected'),
'$sel_aprv' => t('Approve selected'),
- '$h_pending' => t('Registrations waiting for confirm'),
- '$th_pending' => array( t('Request date'), t('Verification status'), t('Timeframe'), 'dId2', t('specified,atip') ),
+ '$h_pending' => t('Verified registrations waiting for approval'),
+ '$th_pending' => array(t('Request date'), 'dId2', t('Email'), 'IP', t('IP Count')),
'$no_pending' => t('No verified registrations.'),
'$approve' => t('Approve'),
'$deny' => t('Deny'),
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php
index 99e20c719..372b65433 100644
--- a/Zotlabs/Module/Regate.php
+++ b/Zotlabs/Module/Regate.php
@@ -136,7 +136,6 @@ class Regate extends \Zotlabs\Web\Controller {
);
if (($flags & ACCOUNT_PENDING ) == ACCOUNT_PENDING) {
- $msg .= "\n".t('Last step will be by an instance admin to agree your account request');
$nextpage = 'regate/' . bin2hex($did2) . $didx;
q("COMMIT");
}
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php
index 2c73f3d6d..1cbea663a 100644
--- a/Zotlabs/Module/Register.php
+++ b/Zotlabs/Module/Register.php
@@ -75,6 +75,8 @@ class Register extends Controller {
$email = ((x($arr,'email')) ? notags(punify(trim($arr['email']))) : '');
$password = ((x($arr,'password')) ? trim($arr['password']) : '');
$password2 = ((x($arr,'password2')) ? trim($arr['password2']) : '');
+ $register_msg = ((x($arr,'register_msg')) ? notags(trim($arr['register_msg'])) : '');
+
$reonar = [];
$auto_create = get_config('system','auto_channel_create', 1);
@@ -182,7 +184,6 @@ class Register extends Controller {
return;
}
-
$policy = get_config('system','register_policy');
$invonly = get_config('system','invitation_only');
$invalso = get_config('system','invitation_also');
@@ -378,11 +379,15 @@ class Register extends Controller {
}
}
- if ( $auto_create ) {
+ if ($auto_create) {
$reonar['chan.name'] = $name;
$reonar['chan.did1'] = $nick;
}
+ if ($policy == REGISTER_APPROVE) {
+ $reonar['msg'] = $register_msg;
+ }
+
$reg = q("INSERT INTO register ("
. "reg_flags,reg_didx,reg_did2,reg_hash,reg_created,reg_startup,reg_expires,"
. "reg_email,reg_pass,reg_lang,reg_atip,reg_stuff)"
@@ -398,7 +403,7 @@ class Register extends Controller {
dbesc($password),
dbesc(substr(get_best_language(),0,2)),
dbesc($ip),
- dbesc(json_encode( $reonar ))
+ dbesc(json_encode($reonar))
);
if ($didx == 'a') {
@@ -537,12 +542,15 @@ class Register extends Controller {
$tos = array('tos', $label_tos, '', '', array(t('no'),t('yes')));
+ $register_msg = ['register_msg', t('Why do you want to join this hub?')];
+
require_once('include/bbcode.php');
$o = replace_macros(get_markup_template('register.tpl'), array(
'$form_security_token' => get_form_security_token("register"),
'$title' => t('Registration'),
'$reg_is' => $registration_is,
+ '$register_msg' => $register_msg,
'$registertext' => bbcode(get_config('system','register_text')),
'$other_sites' => $other_sites,
'$msg' => $opal['msg'],
@@ -563,6 +571,7 @@ class Register extends Controller {
'$pass1' => $password,
'$pass2' => $password2,
'$submit' => t('Register'),
+
));
return $o;