Forum Replies Created

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

    (@metalot)

    Ok this is a bug and I fixed it myself. Please include in the next release!

    The issue was not considering, that empty checkboxes return nothing and need to be saved as well.

    Here what needs to be changed:
    File user-meta-manager.php
    Lines from 1734 to 1741:

    CHANGE FROM:

    foreach($show_fields as $field => $field_name):
    if(isset($_POST[$field_name]) && array_key_exists($field_name, $umm_data)):
    $posted_value = addslashes(htmlspecialchars(trim($_POST[$field_name])));
    $val = (is_numeric($posted_value)) ? sprintf(“%d”, $posted_value) : sprintf(“%s”, $posted_value);
    $output .= $field_name . ” = ” . $val . “\n”;
    update_user_meta($current_user->ID, $field_name, $val);
    endif;
    endforeach;

    CHANGE TO:

    foreach($show_fields as $field => $field_name):
    $posted_value = (isset($_REQUEST[$field_name])) ? addslashes(htmlspecialchars(trim($_REQUEST[$field_name]))) : ”;
    $val = (is_numeric($posted_value)) ? sprintf(“%d”, $posted_value) : sprintf(“%s”, $posted_value);
    $output .= $field_name . ” = ” . $val . “\n”;
    update_user_meta($current_user->ID, $field_name, $val);
    endforeach;

    works fine, just a generated password is used in all cases.
    I did display it and then used for initial login by: editing file:
    wp-content/pdo/wp_install.php

    $message = __(‘Note that password:’ . $random_password . ‘ carefully! It is a random password that was generated just for you.’);

    added this ‘ . $random_password . ‘ part in the middle. Otherwise it was not displayed and no login.

    wp301 works fine with sqlite, good luck, Giedrius

Viewing 2 replies - 1 through 2 (of 2 total)