diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-05-13 10:13:51 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2019-05-13 10:13:51 +0200 |
commit | dc786bd1cc8be6aa0fb476f61e7bbd0f53e56f03 (patch) | |
tree | c036c8aeb3052d9766298be1ac134839acee53a6 /Zotlabs/Module/Register.php | |
parent | 973d91d120c6d14c2973bf897de15a1dea745396 (diff) | |
download | volse-hubzilla-dc786bd1cc8be6aa0fb476f61e7bbd0f53e56f03.tar.gz volse-hubzilla-dc786bd1cc8be6aa0fb476f61e7bbd0f53e56f03.tar.bz2 volse-hubzilla-dc786bd1cc8be6aa0fb476f61e7bbd0f53e56f03.zip |
form security token for mod register ported from zap
Diffstat (limited to 'Zotlabs/Module/Register.php')
-rw-r--r-- | Zotlabs/Module/Register.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index f9d81be0c..bc813f8e1 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -1,10 +1,11 @@ <?php namespace Zotlabs\Module; -require_once('include/channel.php'); +use Zotlabs\Web\Controller; +require_once('include/security.php'); -class Register extends \Zotlabs\Web\Controller { +class Register extends Controller { function init() { @@ -39,7 +40,9 @@ class Register extends \Zotlabs\Web\Controller { function post() { - + + check_form_security_token_redirectOnErr('/register', 'register'); + $max_dailies = intval(get_config('system','max_daily_registrations')); if($max_dailies) { $r = q("select count(account_id) as total from account where account_created > %s - INTERVAL %s", @@ -269,7 +272,8 @@ class Register extends \Zotlabs\Web\Controller { 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, '$registertext' => bbcode(get_config('system','register_text')), |