aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Regate.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-08 19:55:53 +0000
committerMario <mario@mariovavti.com>2021-04-08 19:55:53 +0000
commit18b6d48944be414acc179fb82f458f996810e5a3 (patch)
tree4f45574a53e74d74293c6421103643249a4bf2b0 /Zotlabs/Module/Regate.php
parentf3fa09fc91fe4ca2a44ee4f60d11c5ee70fcefad (diff)
downloadvolse-hubzilla-18b6d48944be414acc179fb82f458f996810e5a3.tar.gz
volse-hubzilla-18b6d48944be414acc179fb82f458f996810e5a3.tar.bz2
volse-hubzilla-18b6d48944be414acc179fb82f458f996810e5a3.zip
rgister: fixes for registering with invitecode outside of open hours
Diffstat (limited to 'Zotlabs/Module/Regate.php')
-rw-r--r--Zotlabs/Module/Regate.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php
index 24139ed06..0c32ebd25 100644
--- a/Zotlabs/Module/Regate.php
+++ b/Zotlabs/Module/Regate.php
@@ -50,13 +50,14 @@ class Regate extends \Zotlabs\Web\Controller {
$ip = $_SERVER['REMOTE_ADDR'];
$isduty = zar_register_dutystate();
- if ($isduty['isduty'] !== false && $isduty['isduty'] != 1) {
+
+ if (!$_SESSION['zar']['invite_in_progress'] && ($isduty['isduty'] !== false && $isduty['isduty'] != 1)) {
// normally, that should never happen here
// log suitable for fail2ban also
$logmsg = 'ZAR1230S Unexpected registration verification request for '
. get_config('system','sitename') . ' arrived from § ' . $ip . ' §';
zar_log($logmsg);
- goaway(z_root() . '/');
+ goaway(z_root());
}
// do we have a valid dId2 ?
@@ -123,6 +124,7 @@ 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");
@@ -270,7 +272,7 @@ class Regate extends \Zotlabs\Web\Controller {
$title = t('Register Verification');
// do we have a valid dId2 ?
- if (($didx == 'a' && substr( $did2 , -2) == substr( base_convert( md5( substr( $did2, 1, -2) ),16 ,10), -2)) || ($didx == 'e')) {
+ if (($didx == 'a' && substr( $did2 , -2) == substr( base_convert( md5( substr( $did2, 1, -2) ),16 ,10), -2)) || ($didx == 'e') || ($didx == 'i')) {
$r = q("SELECT * FROM register WHERE reg_vital = 1 AND reg_didx = '%s' AND reg_did2 = '%s' ORDER BY reg_created DESC",
dbesc($didx),