From 1246415f35b3a45486808d27b0649b373f2740d2 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Sun, 16 Mar 2014 20:38:23 +0100 Subject: Added new constant 'REGISTER_INVITEKEY' --- www/functions/func_register.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'www/functions/func_register.php') diff --git a/www/functions/func_register.php b/www/functions/func_register.php index 8321339..fc93058 100755 --- a/www/functions/func_register.php +++ b/www/functions/func_register.php @@ -25,12 +25,16 @@ function register($db){ $test_status_ar = $test_status_db->fetchArray(SQLITE3_NUM); $test_status_int = $test_status_ar[0]; + if (empty($test_status_ar) || $test_status_int != 0){ + return REGISTER_PROHIBITED; + } + $test_key_db = $db->query("SELECT key FROM user WHERE email='" . $safe_email . "';"); $test_key_ar = $test_key_db->fetchArray(SQLITE3_NUM); $test_key = $test_key_ar[0]; - if (empty($test_status_ar) || $test_status_int != 0 || $test_key != $_POST["key"] || $test_key == ""){ - return REGISTER_PROHIBITED; + if ($test_key != $_POST["key"] || $test_key == ""){ + return REGISTER_INVITEKEY; } $id_db = $db->query("SELECT id FROM user WHERE email='" . $safe_email . "';"); -- cgit v1.2.3