mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Remove various logging.
This commit is contained in:
@@ -87,13 +87,13 @@ class Authenticate
|
||||
*/
|
||||
protected function authenticate($request, array $guards)
|
||||
{
|
||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
// Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
if (0 === count($guards)) {
|
||||
Log::debug('No guards present.');
|
||||
// Log::debug('No guards present.');
|
||||
// go for default guard:
|
||||
/** @noinspection PhpUndefinedMethodInspection */
|
||||
if ($this->auth->check()) {
|
||||
Log::debug('Default guard says user is authenticated.');
|
||||
// Log::debug('Default guard says user is authenticated.');
|
||||
// do an extra check on user object.
|
||||
/** @noinspection PhpUndefinedMethodInspection */
|
||||
/** @var User $user */
|
||||
@@ -102,7 +102,7 @@ class Authenticate
|
||||
Log::warning('User is null, throw exception?');
|
||||
}
|
||||
if (null !== $user) {
|
||||
Log::debug(get_class($user));
|
||||
// Log::debug(get_class($user));
|
||||
if (1 === (int)$user->blocked) {
|
||||
$message = (string)trans('firefly.block_account_logout');
|
||||
if ('email_changed' === $user->blocked_code) {
|
||||
@@ -121,12 +121,12 @@ class Authenticate
|
||||
Log::debug('Guard array is not empty.');
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
Log::debug(sprintf('Now in guard loop, guard is "%s"', $guard));
|
||||
// Log::debug(sprintf('Now in guard loop, guard is "%s"', $guard));
|
||||
if('api' !== $guard) {
|
||||
$this->auth->guard($guard)->authenticate();
|
||||
}
|
||||
$result = $this->auth->guard($guard)->check();
|
||||
Log::debug(sprintf('Result is %s', var_export($result, true)));
|
||||
// Log::debug(sprintf('Result is %s', var_export($result, true)));
|
||||
if ($result) {
|
||||
// According to PHPstan the method returns void, but we'll see.
|
||||
return $this->auth->shouldUse($guard); // @phpstan-ignore-line
|
||||
|
Reference in New Issue
Block a user