diff options
author | Mario <mario@mariovavti.com> | 2021-03-20 16:57:11 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-20 16:57:11 +0100 |
commit | 554745a25a9146a83d5deaaa067b3a8cb4858438 (patch) | |
tree | e40f369628453b92db1a9053e6c00db1966af758 /Zotlabs/Module/Regate.php | |
parent | 04b96e2cdc2b8b1b9a146dadc2610b17262e0991 (diff) | |
download | volse-hubzilla-554745a25a9146a83d5deaaa067b3a8cb4858438.tar.gz volse-hubzilla-554745a25a9146a83d5deaaa067b3a8cb4858438.tar.bz2 volse-hubzilla-554745a25a9146a83d5deaaa067b3a8cb4858438.zip |
air: do not require to verify emailaddress once more after invite code got verified - fixes #1546 but probably still requires some finetuning.
Diffstat (limited to 'Zotlabs/Module/Regate.php')
-rw-r--r-- | Zotlabs/Module/Regate.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php index 077e5fd54..0d430d68c 100644 --- a/Zotlabs/Module/Regate.php +++ b/Zotlabs/Module/Regate.php @@ -61,14 +61,13 @@ class Regate extends \Zotlabs\Web\Controller { // 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') ) { + || ($didx == 'e') || ($didx == 'i')) { // check startup and expiration via [=[register $r = q("SELECT * FROM register WHERE reg_vital = 1 AND reg_did2 = '%s' ", dbesc($did2) ); if ( $r && count($r) == 1 ) { $r = $r[0]; // check timeframe if ( $r['reg_startup'] <= $now && $r['reg_expires'] >= $now ) { - if ( isset($_POST['resend']) && $didx == 'e' ) { $re = q("SELECT * FROM register WHERE reg_vital = 1 AND reg_didx = 'e' AND reg_did2 = '%s' ", dbesc($r['reg_did2']) ); if ( $re && count($re) == 1 ) { @@ -91,6 +90,8 @@ class Regate extends \Zotlabs\Web\Controller { $acpin = (preg_match('/^[0-9]{6,6}$/', $_POST['acpin']) ? $_POST['acpin'] : false); elseif ( $didx == 'e' ) $acpin = (preg_match('/^[0-9a-f]{24,24}$/', $_POST['acpin']) ? $_POST['acpin'] : false); + elseif ( $didx == 'i' ) + $acpin = $r['reg_hash']; else $acpin = false; if ( $acpin && ($r['reg_hash'] == $acpin )) { |