Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

need to escape "" #2

Open
wants to merge 1,705 commits into
base: master
Choose a base branch
from
Open

need to escape "" #2

wants to merge 1,705 commits into from

Conversation

argyrg
Copy link

@argyrg argyrg commented Jan 15, 2017

wp_usermeta
meta_key=wp_capabilities
meta_vale contains quotes such as

a:1:{s:8:"customer";b:1;}

currently this value can not be written because the first double quote is interpreted at an escape wrapper for a comma and the data becomes truncated

@butlerblog
Copy link
Contributor

This repo is a mirror and does not accept pull requests. If you have a PR for WP-Members, it should be submitted at https://github.com/butlerblog/wp-members

The meta key in question is a core WP field that should not be handled as a custom field in WP-Members. It is stored as a serialized array. WP-Members only handles string single meta.

User roles (which is what this field is for) should not be handled directly, regardless of whether you serialize the input.

Any change/update to a user role should be done using methods contained in the WP_User Class hooked to the wpmem_post_register_data or wpmem_post_update_data action.

butlerblog and others added 30 commits November 26, 2022 17:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants