Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter AndresPadrones

    (@andrespadrones)

    I tried to disable all other plugins and didn′t work.

    Also I tried to reinstall plugin, didn′t work.

    Alto I used another backup plugin and was the same: the problem is in that table that aiowps says.

    [02/24/2015 4:08 PM] – FAILURE : Error inserting record into wp_ieyr_aiowps_login_activity

    I was checking the table. Only have 34 registers and it have permissions to modify and inserting records…

    What could be the problem?

    Thanks

    Thread Starter AndresPadrones

    (@andrespadrones)

    Hello again.

    I found in a website the code that generates the error, but I can′t understand why happens, I can write in the table.

    Could anybody help me?

    Thanks in advance!!

    static function wp_login_action_handler($user_login, $user=”)
    {
    global $wpdb, $aio_wp_security;
    $login_activity_table = AIOWPSEC_TBL_USER_LOGIN_ACTIVITY;

    if ($user == ”){
    //Try and get user object
    $user = get_user_by(‘login’, $user_login); //This should return WP_User obj
    if (!$user){
    $aio_wp_security->debug_logger->log_debug(“AIOWPSecurity_User_Login::wp_login_action_handler: Unable to get WP_User object for login “.$user_login,4);
    return;
    }
    }
    $login_date_time = current_time(‘mysql’);
    update_user_meta($user->ID, ‘last_login_time’, $login_date_time); //store last login time in meta table
    $curr_ip_address = AIOWPSecurity_Utility_IP::get_user_ip_address();
    $insert = “INSERT INTO ” . $login_activity_table . ” (user_id, user_login, login_date, login_ip) ” .
    “VALUES (‘” . $user->ID . “‘, ‘” . $user_login . “‘, ‘” . $login_date_time . “‘, ‘” . $curr_ip_address . “‘)”;
    $result = $wpdb->query($insert);
    if ($result == FALSE)
    {
    $aio_wp_security->debug_logger->log_debug(“Error inserting record into “.$login_activity_table,4);//Log the highly unlikely event of DB error
    }

    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: All in One WP Security] Manual DB Backup 'Error inserting record into..’ is closed to new replies.