]> git.mxchange.org Git - friendica.git/blobdiff - mod/register.php
Merge pull request #3439 from tobiasd/20170506-token
[friendica.git] / mod / register.php
index 5e8da4685a0f61d342d180fe68b4d45c0bbfa193..4766445d88cedf8f69bd97991c11583fe6fac37e 100644 (file)
@@ -1,11 +1,14 @@
 <?php
 
+use Friendica\App;
+
 require_once('include/enotify.php');
 require_once('include/bbcode.php');
 require_once('include/user.php');
 
 if(! function_exists('register_post')) {
 function register_post(App $a) {
+       check_form_security_token_redirectOnErr('/register', 'register');
 
        global $lang;
 
@@ -81,7 +84,7 @@ function register_post(App $a) {
                }
 
                // Only send a password mail when the password wasn't manually provided
-               if (!x($_POST,'password1') OR !x($_POST,'confirm')) {
+               if (!x($_POST,'password1') || !x($_POST,'confirm')) {
                        $res = send_register_open_eml(
                                $user['email'],
                                $a->config['sitename'],
@@ -294,7 +297,7 @@ function register_content(App $a) {
                '$sitename'  => $a->get_hostname(),
                '$importh'   => t('Import'),
                '$importt'   => t('Import your profile to this friendica instance'),
-
+               '$form_security_token'  => get_form_security_token("register")
        ));
        return $o;