mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +00:00
Log function
implement log() function.
This commit is contained in:
parent
d6d593d724
commit
14fde5dc9b
122 changed files with 1280 additions and 1161 deletions
|
@ -10,6 +10,7 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Authentication;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\User;
|
||||
|
@ -146,7 +147,7 @@ class Login extends BaseModule
|
|||
);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
logger('authenticate: failed login attempt: ' . notags($username) . ' from IP ' . $_SERVER['REMOTE_ADDR']);
|
||||
Logger::log('authenticate: failed login attempt: ' . notags($username) . ' from IP ' . $_SERVER['REMOTE_ADDR']);
|
||||
info('Login failed. Please check your credentials.' . EOL);
|
||||
$a->internalRedirect();
|
||||
}
|
||||
|
@ -195,7 +196,7 @@ class Login extends BaseModule
|
|||
);
|
||||
if (DBA::isResult($user)) {
|
||||
if ($data->hash != Authentication::getCookieHashForUser($user)) {
|
||||
logger("Hash for user " . $data->uid . " doesn't fit.");
|
||||
Logger::log("Hash for user " . $data->uid . " doesn't fit.");
|
||||
Authentication::deleteSession();
|
||||
$a->internalRedirect();
|
||||
}
|
||||
|
@ -231,7 +232,7 @@ class Login extends BaseModule
|
|||
$check = Config::get('system', 'paranoia');
|
||||
// extra paranoia - if the IP changed, log them out
|
||||
if ($check && ($_SESSION['addr'] != $_SERVER['REMOTE_ADDR'])) {
|
||||
logger('Session address changed. Paranoid setting in effect, blocking session. ' .
|
||||
Logger::log('Session address changed. Paranoid setting in effect, blocking session. ' .
|
||||
$_SESSION['addr'] . ' != ' . $_SERVER['REMOTE_ADDR']);
|
||||
Authentication::deleteSession();
|
||||
$a->internalRedirect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue