diff --git a/frontend/api/class.ApiLogin.php b/frontend/api/class.ApiLogin.php index eba4155e9..3a853a2c6 100644 --- a/frontend/api/class.ApiLogin.php +++ b/frontend/api/class.ApiLogin.php @@ -1173,7 +1173,7 @@ class ApiLogin $gdprAgree = (isset($this->data['gdpr-agree'])) ? $this->data['gdpr-agree'] : '0'; $ajaxKlic = (isset($this->data['ajax'])) ? $this->data['ajax'] : '0'; // Če izvajamo registracjo preko drupala, ker se pošlje post request preko ajaxa - $varnostno_polje = (isset($_POST['varnostno-polje'])) ? $_POST['varnostno-polje'] : false; + $varnostno_polje = (isset($this->data['varnostno-polje'])) ? $this->data['varnostno-polje'] : false; if (!empty($varnostno_polje)) { if($this->method == 'AJAX'){ @@ -1190,7 +1190,7 @@ class ApiLogin // Preverimo ReCaptcha if (!empty($secret_captcha)) { - $recaptchaResponse = $_POST['g-recaptcha-response']; + $recaptchaResponse = $this->data['g-recaptcha-response']; $requestReCaptcha = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret_captcha."&response=".$recaptchaResponse); if (!strstr($requestReCaptcha, "true")) { @@ -1307,11 +1307,11 @@ class ApiLogin // Nastavimo jezik $language = 1; - if(isset($_POST['language'])){ - $language = $_POST['language']; + if(isset($this->data['language'])){ + $language = $this->data['language']; } - elseif(isset($_POST['jezik'])){ - $language = ($_POST['jezik'] == 'en' ? 2 : 1); + elseif(isset($this->data['jezik'])){ + $language = ($this->data['jezik'] == 'en' ? 2 : 1); } if(is_numeric($language)){ diff --git a/frontend/api/class.ApiLoginController.php b/frontend/api/class.ApiLoginController.php index 726c0a8e8..22b2cb948 100644 --- a/frontend/api/class.ApiLoginController.php +++ b/frontend/api/class.ApiLoginController.php @@ -23,7 +23,10 @@ class ApiLoginController{ // Preberemo poslane podatke $this->processCall(); - //$this->processCallForm(); + + if(empty($this->data)) { + $this->processCallForm(); + } /*echo 'Params:'; diff --git a/function.php b/function.php index 31cd6880c..c272b7637 100644 --- a/function.php +++ b/function.php @@ -1119,7 +1119,7 @@ function isDebug(){ global $admin_type, $debug, $site_domain; if(isset($debug) && $debug > 0){ - if ($admin_type == 0 || in_array($site_domain, ['test.1ka.si', 'localhost', '1ka.test'])) { + if ($admin_type == 0 || in_array($site_domain, ['test2.1ka.si', 'test.1ka.si', 'localhost', '1ka.test'])) { return true; } }