aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-08 20:01:56 +0000
committerMario <mario@mariovavti.com>2021-04-08 20:01:56 +0000
commita34d8852b6695086ef3c9f5ff882d0d033f7d4a5 (patch)
tree1b659c2225d28cc717e98c22f2d3c95e494154e8 /Zotlabs/Module
parent18b6d48944be414acc179fb82f458f996810e5a3 (diff)
downloadvolse-hubzilla-a34d8852b6695086ef3c9f5ff882d0d033f7d4a5.tar.gz
volse-hubzilla-a34d8852b6695086ef3c9f5ff882d0d033f7d4a5.tar.bz2
volse-hubzilla-a34d8852b6695086ef3c9f5ff882d0d033f7d4a5.zip
minor revert
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Register.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php
index c1355eba7..9d2a8aa96 100644
--- a/Zotlabs/Module/Register.php
+++ b/Zotlabs/Module/Register.php
@@ -222,9 +222,15 @@ class Register extends Controller {
if ($reg['reg_startup'] <= $now && $reg['reg_expires'] >= $now) {
+ // is invitor admin
+ $isa = get_account_by_id($reg['reg_uid']);
+ $isa = ( $isa && ($isa['account_roles'] && ACCOUNT_ROLE_ADMIN) );
+
// FIXME: set the correct flags if invitee is admin so we do not need to approve anyway if approve is on
- //if (is_sys_channel($reg['reg_uid']) && $policy == REGISTER_APPROVE)
- // $flags &= $flags ^ ACCOUNT_PENDING;
+ // approve contra invite by admin
+ if ($isa && $policy == REGISTER_APPROVE)
+ $flags &= $flags ^ ACCOUNT_PENDING;
+
if ($auto_create) {
$reonar['chan.name'] = notags(trim($arr['name']));