From 199c536f21d26f084a6230b18f422f0dcc384f5e Mon Sep 17 00:00:00 2001 From: hdlineage Date: Sun, 6 Dec 2020 20:03:39 -0500 Subject: [PATCH] Fix some minor bugs. --- minecraft-authme/minecraft-authme.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/minecraft-authme/minecraft-authme.php b/minecraft-authme/minecraft-authme.php index 63a428b..4be002e 100644 --- a/minecraft-authme/minecraft-authme.php +++ b/minecraft-authme/minecraft-authme.php @@ -12,25 +12,25 @@ require_once('Sha256.php'); function minecraft_authme_main() { - + $content = ''; ob_start(); ?> Error: Request denied due to spam activity.'; + $msg = '

Error: Request denied due to spam activity.

'; } else if ($controller->isUserRegistered($post_data['username'])) { - $msg = '

Error: This user already exists.

'; + $msg = '

Error: This user already exists.

'; } else if (preg_match('/\s/',$post_data['username']) || strlen($post_data['username']) > 16 || $post_data['username']==''){ - $msg = '

Error: Invalid choice of username.

Cannot contain spaces. Maximum 16 Characters.

'; + $msg = '

Error: Invalid choice of username.

Cannot contain spaces. Maximum 16 Characters.

'; } else if (strlen($post_data['password']) < 6 || $post_data['password']==''){ - $msg = '

Error: Invalid choice of password.

Minimum 6 Characters.

'; + $msg = '

Error: Invalid choice of password.

Minimum 6 Characters.

'; } else if (!is_email_valid($post_data['email'])) { - $msg = '

Error: The supplied email is invalid.

'; + $msg = '

Error: The supplied email is invalid.

'; } else if ($post_data['repass'] != $post_data['password']) { - $msg = '

Error: Please confirm passwords and try again

'; + $msg = '

Error: Please confirm passwords and try again

'; } else if ($post_data['invCode'] != $post_data['invitation']) { - $msg = '

Error: The supplied invitation code is invalid.

'; + $msg = '

Error: The supplied invitation code is invalid.

'; } else { $register_success = $controller->register($post_data['username'], $post_data['password'], $post_data['email']); if ($register_success) { $status = true; $msg = ' -

Welcome, '.htmlspecialchars($post_data['username']).'!
Registration completed.

+

Welcome, '.htmlspecialchars($post_data['username']).'!
Registration completed.

You may now use the account to login at minecraft.henrychang.ca

'; if($options['email'] != '') wp_mail($options['email'], "New Minecraft Player Registration", 'Minecraft Authme notification:
'.$post_data['username'].' has just registered with email: '.$post_data['email']); } else { - $msg = '

Error: Unfortunately, there was an error during the registration.

'; + $msg = '

Error: Unfortunately, there was an error during the registration.

'; } } return array(