diff options
author | Hilmar R <u02@u29lx193> | 2021-01-28 22:08:38 +0100 |
---|---|---|
committer | Hilmar R <u02@u29lx193> | 2021-01-28 22:08:38 +0100 |
commit | 4ecb4189b8787d57c601ebf467ecd94fa706d1ca (patch) | |
tree | 7e557b35df239b135dc8e811ad424b5f913e9f25 /Zotlabs/Module/Register.php | |
parent | d0d6170a71a1acd73995450e16586a7b69abb3e1 (diff) | |
download | volse-hubzilla-4ecb4189b8787d57c601ebf467ecd94fa706d1ca.tar.gz volse-hubzilla-4ecb4189b8787d57c601ebf467ecd94fa706d1ca.tar.bz2 volse-hubzilla-4ecb4189b8787d57c601ebf467ecd94fa706d1ca.zip |
Register panel interaction consistence usage
Diffstat (limited to 'Zotlabs/Module/Register.php')
-rw-r--r-- | Zotlabs/Module/Register.php | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index 64db7a253..1cf5af5b3 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -14,7 +14,7 @@ class Register extends Controller { function init() { // ZAR0 - + $result = null; $cmd = ((argc() > 1) ? argv(1) : ''); @@ -53,9 +53,10 @@ class Register extends Controller { * [hilmar:] * It may happen, the posted form arrives in a strange fashion. With the control of the duty hours * for registration, the input form was disabled at html. While receiving posted data, checks are - * required if all is on the right road (no posts accepted during off duty). + * required if all is on the right road (most posts are not accepted during off duty). * */ + $act = q("SELECT COUNT(*) AS act FROM account")[0]['act']; $duty = zar_register_dutystate(); @@ -82,7 +83,7 @@ class Register extends Controller { goaway(z_root() . '/regate/' . bin2hex($email) . 'e' ); } - if ( preg_match('/^d{1,1}[0-9]{1,10}$/', $email ) ) { + if ( preg_match('/^d{1,1}[0-9]{6,10}$/', $email ) ) { // dId2 A artifical & anonymous goaway(z_root() . '/regate/' . bin2hex($email) . 'a' ); } @@ -109,7 +110,7 @@ class Register extends Controller { } // s2 max daily - if ( self::check_reg_limits() ) return; + if ( self::check_reg_limits()['is'] ) return; // accept tos if(! x($_POST,'tos')) { @@ -209,7 +210,7 @@ class Register extends Controller { } else { notice('ZAR0236E ' . t('Invitation not in time or too late') . EOL); - goaway(z_root()); + goaway(z_root() . '/~'); } } else { @@ -217,7 +218,7 @@ class Register extends Controller { $msg = 'ZAR0235S ' . t('Invitation email failed'); zar_log($msg); notice($msg . EOL); - goaway(z_root()); + goaway(z_root() . '/~'); } } else { @@ -225,12 +226,12 @@ class Register extends Controller { $msg = 'ZAR0234S ' . t('Invitation code failed') ; zar_log($msg); notice( $msg . EOL); - goaway(z_root()); + goaway(z_root() . '/~'); } } else { notice('ZAR0232E ' . t('Invitations are not available') . EOL); - goaway(z_root()); + goaway(z_root() . '/~'); } @@ -388,7 +389,7 @@ class Register extends Controller { function get() { - + $registration_is = ''; $other_sites = ''; @@ -492,6 +493,12 @@ class Register extends Controller { $o = replace_macros(get_markup_template('register.tpl'), array( + '$tao' => "typeof(window.tao) == 'undefined' ? window.tao = {} : '';\n" + . "tao.zar = { vsn: '2.0.0', form: {}, msg: {} };\n" + . "tao.zar.patano = /^d[0-9]{6}$/;\n" + . "tao.zar.patema = /^[a-z0-9.-]{2,64}@[a-z0-9.-]{4,32}\.[a-z]{2,12}$/;\n" + . "tao.zar.msg.ZAR0239E = '" . t('email mistake') . "';\n", + '$form_security_token' => get_form_security_token("register"), '$title' => t('Registration'), '$reg_is' => $registration_is, |