1
0
Fork 0

"print_r" in logging replaced / obsolete stuff removed

This commit is contained in:
Michael 2020-06-29 20:22:00 +00:00
commit c947b7f211
19 changed files with 43 additions and 81 deletions

View file

@ -131,7 +131,7 @@ class CurlResult
$this->errorNumber = $errorNumber;
$this->error = $error;
Logger::log($url . ': ' . $this->returnCode . " " . $result, Logger::DATA);
Logger::debug('construct', ['url' => $url, 'returncode' => $this->returnCode, 'result' => $result]);
$this->parseBodyHeader($result);
$this->checkSuccess();
@ -167,7 +167,7 @@ class CurlResult
}
if (!$this->isSuccess) {
Logger::error('error', ['url' => $this->url, 'code' => $this->returnCode, 'error' => $this->error, 'callstack' => System::callstack(20)]);
Logger::notice('http error', ['url' => $this->url, 'code' => $this->returnCode, 'error' => $this->error, 'callstack' => System::callstack(20)]);
Logger::debug('debug', ['info' => $this->info]);
}

View file

@ -51,12 +51,12 @@ class FKOAuth1 extends OAuthServer
*/
public function loginUser($uid)
{
Logger::log("FKOAuth1::loginUser $uid");
Logger::notice("FKOAuth1::loginUser $uid");
$a = DI::app();
$record = DBA::selectFirst('user', [], ['uid' => $uid, 'blocked' => 0, 'account_expired' => 0, 'account_removed' => 0, 'verified' => 1]);
if (!DBA::isResult($record)) {
Logger::log('FKOAuth1::loginUser failure: ' . print_r($_SERVER, true), Logger::DEBUG);
Logger::info('FKOAuth1::loginUser failure', ['server' => $_SERVER]);
header('HTTP/1.0 401 Unauthorized');
die('This api requires login');
}