I have created new colums in a SQL table ‘wp_users’. Those fields are
“giodo”, “handel” and “regulamin”.
Don’t add columns to Core tables. There is no guarantee that these won’t be destroyed or corrupted on next update. What you should be using is user meta, and in fact that appears to be what you are actually using:
add_action('user_register', 'myplugin_user_register');
function myplugin_user_register ($user_id) {
if ( isset( $_POST['giodo'] ) )
update_user_meta($user_id, 'giodo', $_POST['giodo']);
}
So the question is a bit confusing.
Your code should have already inserted data into the database, just not where you are trying to put it. Your code should have inserted the data into the $wpdb->usermeta
table and can be retrieved using get_user_meta()
. That is what I would suggest. Abandon the attempt to add columns to a Core table and use the user meta API, which is what it was built for.
Related Posts:
- Register new user, assign custom role then send email
- How To Get User Data in Callback Function for pre_user_nicename?
- Building a request processor for multi-page forms, etc using $_GET requests
- How to pass a variable between filter/action functions?
- Updating User Profile on Registration
- GET form action. Redirect to self
- add_action(), add_filter() before or after function
- Trouble understanding apply_filters()
- What is the very earliest action hook you can call?
- wp_headers vs send_headers. When to use each?
- How to filter users on admin users page by custom meta field?
- How to bulk delete all users with no posts?
- How many filter/action hooks are healthy?
- Earliest hook to reliably get $post/$posts
- Remove Editor From Homepage
- What does (10, 2) mean when used with add_filter
- Filter username field on registration for profanity and unwanted words
- Valid characters for actions, hooks and filters
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- How to check if a hook is hooked or not?
- Is it possible to use object in add_action?
- How can I add information underneath the user’s name on the users.php page?
- Store source permalink on XMLRPC calls
- How to make post and comment count unclickable with dashboard_glance_items hook
- Hook into admin post list page
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- How do I know if author field was changed on post save?
- How may I filter get_users() similarly to pre_get_posts?
- Using hooks to place content in theme dynamically
- About Hooks and Filters
- PHP5, Inheritance, Singleton – action & filter hook limitations
- Should I use add_action(‘publish_post or add_filter(‘publish_post?
- Please explain me what the do_action does
- Customize the “Registration complete. Please check your e-mail.” message on WP 4.0
- Apply the_title filter to post titles AND backend auto social-sharing plugin, but not nav menu
- add_action uses ‘echo’ add_filter uses ‘return’, why?
- changing variable through filters or action hooks
- Too many actions/filters!
- Apply a filter only once
- How to get list of all hooks of current theme / plugin?
- Making a class available via actions filters
- How does WordPress call functions attached to a certain action hook before calling functions attached to other hooks
- How to get current action?
- Conditionally call add_action depending on post_type?
- how to change appearence of the content of default post list columns?
- Anonymous function is executed twice in wp_head while added from the_posts filter?
- Explanation for remove_filter used in the below code [closed]
- How to change the blog title with add_filter? details below
- What’s the best way to split admin-only functionality in the theme’s functions.php file?
- Filter list by a unique meta value dilemma
- return values from hooks do_action and apply_filters, which is better
- How to get all the predefined do_action() calls from an active theme
- Is it possible to track down Actions and Filters?
- When to use actions and when to use filters
- Stop loading “collaborators” users on add new post or page?
- Return a custom value in a function added to an action hook
- Is possible dequeue/remove style from wp_footer() hook and add on wp_head() hook?
- Same Conditionals Not Working on Two Different Hooks
- How can i filter wordpress users by custom feild?
- Replace Data In Post & Update Meta Field Post Is Saved
- style_loader_tag not changing stylesheet to preload
- Adding link options in insert/edit link dialog window
- Perform multiple actions after wp_insert_user()
- How to redirect a unique link based on login status
- Hook to change the site URL
- WP_Query filter by custom meta
- Hook to add content after date in post?
- add_action with associative array
- how to use apply filter for Class?
- How can I see exactly what arguments are being passed through a filter so that I may modify them?
- WordPress set featured image to first image of the post
- WordPress: Issue with filtering users using date range
- Does anybody know what the $current_screen ->id for customizer.php is?
- adding an action inside if condition not working
- Using add_filters() , apply_filter(), add_action() and do_action() in extending a plugin
- Action for opening attachment or manipulating all attachment links
- Insert user register into my own user table instead of wp own user
- Put data in my-account/view-order/id/ page
- What action/filter can be used for modifying the page to be rendered?
- Hook inside a hook
- Filter and validate user role in registration
- What problems could happen if I replaced add_filter and add_action with the function calling
- check, if any “add_action” function contains string XXXXXXXXX
- Remove action added from class
- Custom search fields and AJAX support
- Adding to an array & passing it through do_action/apply_filters
- Hook into ‘when user logs in’ [persistent login]
- Is this correct usage of filters in WordPress [closed]
- How would I remove an inline googleAPI font script in the the parent theme header.php?
- can’t output gray scaled image I’ve created using add_image_size
- view and update form only for registered users
- Is it possible to make get variable out of filter in Class?
- How do you disable the verification process of user email changes?
- Filter and manipulate the get_current_user() function
- Can you call a filter hook by “add_action”?
- Change password reqts with NO plugin without breaking resetpass link?
- How to change content hash value, within the_block_template_skip_link action?
- Change or replace user_profile_picture_description filter, to stop stripping whitespace
- How to use add_filter to add the extra data to existing array?
- How to use render_block filter in Gutenberg when editing a page?