diff options
Diffstat (limited to 'core/ajax/validateuser.php')
-rw-r--r-- | core/ajax/validateuser.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/ajax/validateuser.php b/core/ajax/validateuser.php index 032948fc331..258bd50fcad 100644 --- a/core/ajax/validateuser.php +++ b/core/ajax/validateuser.php @@ -30,11 +30,10 @@ if(!isset($_SERVER['PHP_AUTH_USER'])){ echo 'Valid credentials must be supplied'; exit(); } else { - header("Content-Type: application/jsonrequest"); if(OC_User::checkPassword($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])){ - echo json_encode(array("username" => $_SERVER["PHP_AUTH_USER"], "user_valid" => "true")); + OC_JSON::encodedPrint(array("username" => $_SERVER["PHP_AUTH_USER"], "user_valid" => "true")); } else { - echo json_encode(array("username" => $_SERVER["PHP_AUTH_USER"], "user_valid" => "false")); + OC_JSON::encodedPrint(array("username" => $_SERVER["PHP_AUTH_USER"], "user_valid" => "false")); } } |