Merge pull request #4224 from friendica/fabrixxm-patch-api-login

Fix api login
This commit is contained in:
Michael Vogel 2018-01-13 09:28:17 +01:00 committed by GitHub
commit 725bb9641a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,7 +226,7 @@ function api_login(App $a)
} }
} }
if (DBM::is_result($record)) { if (!DBM::is_result($record)) {
logger('API_login failure: ' . print_r($_SERVER, true), LOGGER_DEBUG); logger('API_login failure: ' . print_r($_SERVER, true), LOGGER_DEBUG);
header('WWW-Authenticate: Basic realm="Friendica"'); header('WWW-Authenticate: Basic realm="Friendica"');
//header('HTTP/1.0 401 Unauthorized'); //header('HTTP/1.0 401 Unauthorized');