mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-03 20:55:05 +00:00 
			
		
		
		
	Fix some logging.
This commit is contained in:
		@@ -109,7 +109,7 @@ class LoginController extends Controller
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        /** Copied directly from AuthenticatesUsers, but with logging added: */
 | 
					        /** Copied directly from AuthenticatesUsers, but with logging added: */
 | 
				
			||||||
        if ($this->attemptLogin($request)) {
 | 
					        if ($this->attemptLogin($request)) {
 | 
				
			||||||
            Log::channel('audit')->info(sprintf('User "%s" has been logged in.', $request->get('email')));
 | 
					            Log::channel('audit')->info(sprintf('User "%s" has been logged in.', $request->get($this->username())));
 | 
				
			||||||
            Log::debug(sprintf('Redirect after login is %s.', $this->redirectPath()));
 | 
					            Log::debug(sprintf('Redirect after login is %s.', $this->redirectPath()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // if you just logged in, it can't be that you have a valid 2FA cookie.
 | 
					            // if you just logged in, it can't be that you have a valid 2FA cookie.
 | 
				
			||||||
@@ -123,7 +123,7 @@ class LoginController extends Controller
 | 
				
			|||||||
        // to login and redirect the user back to the login form. Of course, when this
 | 
					        // to login and redirect the user back to the login form. Of course, when this
 | 
				
			||||||
        // user surpasses their maximum number of attempts they will get locked out.
 | 
					        // user surpasses their maximum number of attempts they will get locked out.
 | 
				
			||||||
        $this->incrementLoginAttempts($request);
 | 
					        $this->incrementLoginAttempts($request);
 | 
				
			||||||
        Log::channel('audit')->info(sprintf('Login failed. Attempt for user "%s" failed.', $request->get('email')));
 | 
					        Log::channel('audit')->info(sprintf('Login failed. Attempt for user "%s" failed.', $request->get($this->username())));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->sendFailedLoginResponse($request);
 | 
					        $this->sendFailedLoginResponse($request);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,6 @@ class CreateUsersTable extends Migration
 | 
				
			|||||||
                    $table->string('reset', 32)->nullable();
 | 
					                    $table->string('reset', 32)->nullable();
 | 
				
			||||||
                    $table->tinyInteger('blocked', false, true)->default('0');
 | 
					                    $table->tinyInteger('blocked', false, true)->default('0');
 | 
				
			||||||
                    $table->string('blocked_code', 25)->nullable();
 | 
					                    $table->string('blocked_code', 25)->nullable();
 | 
				
			||||||
                    $table->unique('email');
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user