"print_r" in logging replaced / obsolete stuff removed
This commit is contained in:
parent
9a47e51115
commit
c947b7f211
19 changed files with 43 additions and 81 deletions
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue