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 many filter/action hooks are healthy?
- Valid characters for actions, hooks and filters
- Is it possible to use object in add_action?
- How can I add information underneath the user’s name on the users.php 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
- 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?
- Too many actions/filters!
- 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?
- 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?
- 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?
- 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?
- Is there a filter called ‘network_admin_init’?
- 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
- Are there actions or filters I can use for Ajax calls?
- Correct method of redirecting user login
- How to modify the action attribute of the wp-login.php?action=register form?
- How to filter for user registration, be able to throw error message
- Shortcodes — Using add_action, add_filter in the shortcode
- Can i add password field into my wp registration form?
- How to validate recaptcha on comments 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]
- 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?
- Change password reqts with NO plugin without breaking resetpass link?