PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/component/class-login-lockout.php +1 -15 6.2.3 → 6.3.0 View file →
@@ -344,23 +344,9 @@
344 344 * @param string $scenario The scenario constant (e.g., SCENARIO_LOGIN_FAIL).
345 345 * @param string $message Additional message for the log.
346 346 */
347 347 public function log_event( $ip, $username, $scenario, $message = '' ) {
348 - $user_agent = defender_get_data_from_request( 'HTTP_USER_AGENT', 's' );
349 - $model = new Lockout_Log();
350 - $model->ip = $ip;
351 - $model->user_agent = isset( $user_agent )
352 - ? User_Agent::fast_cleaning( $user_agent )
353 - : null;
354 - $model->date = time();
355 - $model->tried = $username;
356 - $model->blog_id = get_current_blog_id();
357 -
358 - $ip_to_country = $this->ip_to_country( $ip );
359 -
360 - if ( isset( $ip_to_country['iso'] ) ) {
361 - $model->country_iso_code = $ip_to_country['iso'];
362 - }
348 + $model = Lockout_Log::create( $ip, $username );
363 349
364 350 switch ( $scenario ) {
365 351 case self::SCENARIO_LOGIN_FAIL:
366 352 $model->type = Lockout_Log::AUTH_FAIL;