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?
- Remove Editor From Homepage
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Is it possible to use object in add_action?
- Store source permalink on XMLRPC calls
- How to make post and comment count unclickable with dashboard_glance_items hook
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- How may I filter get_users() similarly to pre_get_posts?
- Using hooks to place content in theme dynamically
- PHP5, Inheritance, Singleton – action & filter hook limitations
- 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
- 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?
- How to get all the predefined do_action() calls from an active theme
- When to use actions and when to use filters
- Stop loading “collaborators” users on add new post or page?
- Is possible dequeue/remove style from wp_footer() hook and add on wp_head() hook?
- How to call a function or method that is Namespaced using another plugin
- How to change currency programmatically on creating order action?
- add filter login_redirect does not contain original requested redirect
- Front End Registration Form Code – Password Field Not Saving
- get_header and hook avoid normal call
- Removing an action, or dequeueing style – Both not working
- How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
- Replace a word with a word in the URL string
- How to take options from form fields and turn them in to links?
- How to add ‘total’ value to custom column title on the posts list page
- Filter taxonomy admin pagination
- When to use add_action when registering/enqueuing scripts
- How to modify the action attribute of the wp-login.php?action=register form?
- Shortcodes — Using add_action, add_filter in the shortcode
- Can the wordpress color palettes by changed through Javascript?
- Can i add password field into my wp registration form?
- How to properly modify WP Vary or any existing headers?
- How to remove medium size class in gravity form for input tag?
- Add default user field to WooCommerce checkout [closed]
- How to customize the “Insert/edit link” popup box?
- Proper after_setup_theme and wp_head cleanup
- How can I output all apply_filters and do_action?
- How to allow code block in wordpress comments
- remove_action: how to access to a method in an child class?
- Filter for when the post is updated
- Woocomemrce order and registration fileds to UPPERCASE
- How to modify only part of a function through the filter
- Filter get_page_by_path()
- Remove actions/filters that are set with create_function()
- Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
- Alter existing page contents based on url
- Front end register with custom fields
- Add/remove CRON action depending on variable
- How to access page variable inside action hook
- How to include add_filter() in a condition based on $post data
- Admin: how to make a custom list filter button send GET queryvars
- Use has_filter on comment_post
- Echo string in admin panel footer beside version no
- How to change default text for specific post type
- What is the action or filter for adding information under the Permalink in Edit Post/Page?
- alternative to the_content filter
- Search a title word through query_posts (not the exact match)
- output custom Posts on a Page
- How can i filter wordpress users by custom feild?
- Adding link options in insert/edit link dialog window
- How to redirect a unique link based on login status
- Hook to change the site URL
- 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
- Using add_filters() , apply_filter(), add_action() and do_action() in extending a plugin
- What problems could happen if I replaced add_filter and add_action with the function calling
- 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]
- can’t output gray scaled image I’ve created using add_image_size
- Is it possible to make get variable out of filter in Class?
- How do you disable the verification process of user email changes?
- Can you call a filter hook by “add_action”?
- 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