diff --git a/core/users/signup.php b/core/users/signup.php
index 58cc906476..ab364556fa 100644
--- a/core/users/signup.php
+++ b/core/users/signup.php
@@ -59,22 +59,25 @@ require_once "resources/require.php";
}
//get the values from http and set as variables
- $username = check_str($_POST["username"]);
- $password = check_str($_POST["password"]);
- $confirmpassword = check_str($_POST["confirmpassword"]);
- $group_uuid_name = check_str($_POST["group_uuid_name"]);
- $user_email = check_str($_POST["user_email"]);
- $contact_organization = check_str($_POST["contact_organization"]);
- $contact_name_given = check_str($_POST["contact_name_given"]);
- $contact_name_family = check_str($_POST["contact_name_family"]);
+ if (sizeof($_POST) > 0) {
+ $username = check_str($_POST["username"]);
+ $password = check_str($_POST["password"]);
+ $confirmpassword = check_str($_POST["confirmpassword"]);
+ $group_uuid_name = check_str($_POST["group_uuid_name"]);
+ $user_email = check_str($_POST["user_email"]);
+ $contact_organization = check_str($_POST["contact_organization"]);
+ $contact_name_given = check_str($_POST["contact_name_given"]);
+ $contact_name_family = check_str($_POST["contact_name_family"]);
-if ($group_uuid_name != '') {
- $group_data = explode('|', $group_uuid_name);
- $group_uuid = $group_data[0];
- $group_name = $group_data[1];
-}
+ if ($group_uuid_name != '') {
+ $group_data = explode('|', $group_uuid_name);
+ $group_uuid = $group_data[0];
+ $group_name = $group_data[1];
+ }
+ }
-if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
+
+if (count($_POST) > 0 && check_str($_POST["persistform"]) != "1") {
$msg = '';
@@ -93,10 +96,10 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
$msg .= $text['message-required'].$text['label-username']."
\n";
}
else {
- $sql = "SELECT * FROM v_users ";
- $sql .= "WHERE username = '$username' ";
+ $sql = "select * from v_users ";
+ $sql .= "where username = '$username' ";
if ($_SESSION["user"]["unique"]["text"] != "global") {
- $sql .= "AND domain_uuid = '$domain_uuid' ";
+ $sql .= "and domain_uuid = '$domain_uuid' ";
}
//$sql .= "and user_enabled = 'true' ";
$prep_statement = $db->prepare(check_sql($sql));
@@ -310,25 +313,29 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
echo "