When I edit a USER on the standard WordPress User admin page, upon saving changes, the error pops up preventing the record form being saved. If I change the User Display Name I can then save the changes. The program is failing on validation by checking its own record for duplicates. Once the record is saved, I can go back in and change the Display Name back to the original name without problems. I just can not edit a user and save the record without changing the Display Name.
]]>update_user_meta()
when the form processes, but my checkboxes aren’t updating. update_user_meta()
:
public function zto_membergroup_members()
{
$zto_helpers = new Zto_Helpers();
if (isset($_REQUEST['updated'])) {
$membergroups_from_db = get_user_meta($user_id, 'zto_membergroup');
$membergroups = \wp_parse_args($membergroups_from_db, $zto_helpers->zto_membergroup_defaults());
$membergroups['zto_membergroup_one'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_one']);
$membergroups['zto_membergroup_two'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_two']);
$membergroups['zto_membergroup_three'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_three']);
$membergroups['zto_membergroup_four'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_four']);
$membergroups['zto_membergroup_five'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_five']);
} else {
$membergroups = $zto_helpers->zto_membergroup_defaults();
}
update_user_meta($user_id, 'zto_membergroup', $membergroups);
}
The HTML for the form for the User Profile fields:
<th><label for="mobile_number">Mobile Number:</label></th>
<td><input type="text" name="mobile_number" id="mobile_number" placeholder="9876543210" value="<?php echo $mobile_number ? $mobile_number : ''; ?>" class="regular-text"></td>
</tr>
<?php
$user_membership = get_user_meta($user_id, 'zto_membergroup');
$user_membership = wp_parse_args($user_membership, $zto_helpers_general->zto_membergroup_defaults());
$html_concat .= '<tr><td><label for="';
$html_concat .= esc_html('zto_membergroup').'[zto_membergroup_one]" id="zto_membergroup_one">Group One Member</label>';
$html_concat .= '<input class="cm-toggle" type="checkbox" name="';
$html_concat .= esc_html('zto_membergroup').'[zto_membergroup_one]" id="';
$html_concat .= esc_html('zto_membergroup').'[zto_membergroup_one]" value="1" ';
$html_concat .= checked($user_membership['zto_membergroup_one'], '1', true).'>
</td></tr>
';
Thank you!
When I edit and save a user, the password of the user is also changed, although I have NOT changed the password or pressed the button “Change password”! I have already checked this error and it only occurs when the plugin is activated!
]]>Thanks!
]]>In Default WordPress while creating new User or editing User account there are
Do I need to set the Image? I have got an Avatar plugin and also I have customized inserting big Image with ACF (Advanced custom fields).
Currently, it took the default image from SEO settings. How can I insert different Images on the User Profile area?
Thanks.
]]>As an admin i see the edit option, but if i test with a user account. no edit option on comments.
Any idea whats causing this?
1. they are inside the time limit period
2. option is totally not there
I did read something about adding HTML to enable the cell but I could not figure out what code is needed to allow the user to paste the image.
Please let me know if there is a way to accomplish this. thnx
]]>