This topic contains 9 reply and 2 voices, and was last updated by towhid 4 years, 2 months ago
Viewing 9 Posts - 1 through 9 (of 9 total)
Author Posts
August 4, 2015 at 1:29 pm 65199
towhid Hi, How do I get the user data I stored using a registration form for a specific user?
August 5, 2015 at 4:42 pm 65439
towhid towhid

Hello MareVisie,

Use this function for retrive user date get_userdata( $userid );

Also, please check this link:

https://codex.wordpress.org/Function_Reference/get_userdata

Thanks

August 5, 2015 at 4:49 pm 65442
MareVisie MareVisie

Hi Towhid,

Thank you for your reply.

Does WPUF store new meta keys made by Registration Forms in an existing WordPress database table? Or does it have its own dedicated table?

August 5, 2015 at 5:13 pm 65448
towhid towhid

Helloo MareVisie,

User data goes to wp_users table in the WordPress database.

Thanks

August 14, 2015 at 3:24 pm 67021
MareVisie MareVisie

Hi Towhid,

Due to other matters that deserved my attention I haven’t gotten to this untill now. I have tried using your method, however I can’t seem to get the custom field data I want using get_userdata($userid). Here’s the output I get when using $userid = 1:


object(WP_User)[1993]
  public 'data' => 
    object(stdClass)[1992]
      public 'ID' => string '1' (length=1)
      public 'user_login' => string 'Sjors' (length=5)
      public 'user_pass' => string '*LEFT OUT FOR PRIVACY*' (length=34)
      public 'user_nicename' => string 'sjors' (length=5)
      public 'user_email' => string '*LEFT OUT FOR PRIVACY*' (length=30)
      public 'user_url' => string 'http://www.srcthor.nl' (length=21)
      public 'user_registered' => string '2015-08-03 07:16:22' (length=19)
      public 'user_activation_key' => string '' (length=0)
      public 'user_status' => string '0' (length=1)
      public 'display_name' => string 'Sjors' (length=5)
  public 'ID' => int 1
  public 'caps' => 
    array (size=1)
      'administrator' => boolean true
  public 'cap_key' => string 'wp_capabilities' (length=15)
  public 'roles' => 
    array (size=1)
      0 => string 'administrator' (length=13)
  public 'allcaps' => 
    array (size=84)
      'switch_themes' => boolean true
      'edit_themes' => boolean true
      'activate_plugins' => boolean true
      'edit_plugins' => boolean true
      'edit_users' => boolean true
      'edit_files' => boolean true
      'manage_options' => boolean true
      'moderate_comments' => boolean true
      'manage_categories' => boolean true
      'manage_links' => boolean true
      'upload_files' => boolean true
      'import' => boolean true
      'unfiltered_html' => boolean true
      'edit_posts' => boolean true
      'edit_others_posts' => boolean true
      'edit_published_posts' => boolean true
      'publish_posts' => boolean true
      'edit_pages' => boolean true
      'read' => boolean true
      'level_10' => boolean true
      'level_9' => boolean true
      'level_8' => boolean true
      'level_7' => boolean true
      'level_6' => boolean true
      'level_5' => boolean true
      'level_4' => boolean true
      'level_3' => boolean true
      'level_2' => boolean true
      'level_1' => boolean true
      'level_0' => boolean true
      'edit_others_pages' => boolean true
      'edit_published_pages' => boolean true
      'publish_pages' => boolean true
      'delete_pages' => boolean true
      'delete_others_pages' => boolean true
      'delete_published_pages' => boolean true
      'delete_posts' => boolean true
      'delete_others_posts' => boolean true
      'delete_published_posts' => boolean true
      'delete_private_posts' => boolean true
      'edit_private_posts' => boolean true
      'read_private_posts' => boolean true
      'delete_private_pages' => boolean true
      'edit_private_pages' => boolean true
      'read_private_pages' => boolean true
      'delete_users' => boolean true
      'create_users' => boolean true
      'unfiltered_upload' => boolean true
      'edit_dashboard' => boolean true
      'update_plugins' => boolean true
      'delete_plugins' => boolean true
      'install_plugins' => boolean true
      'update_themes' => boolean true
      'install_themes' => boolean true
      'update_core' => boolean true
      'list_users' => boolean true
      'remove_users' => boolean true
      'add_users' => boolean true
      'promote_users' => boolean true
      'edit_theme_options' => boolean true
      'delete_themes' => boolean true
      'export' => boolean true
      'list_roles' => boolean true
      'create_roles' => boolean true
      'edit_roles' => boolean true
      'delete_roles' => boolean true
      'edit_role_menus' => boolean true
      'edit_posts_role_permissions' => boolean true
      'edit_pages_role_permissions' => boolean true
      'edit_nav_menu_permissions' => boolean true
      'edit_content_shortcodes' => boolean true
      'delete_content_shortcodes' => boolean true
      'edit_login_redirects' => boolean true
      'delete_login_redirects' => boolean true
      'edit_attachments' => boolean true
      'delete_attachments' => boolean true
      'read_others_attachments' => boolean true
      'edit_others_attachments' => boolean true
      'delete_others_attachments' => boolean true
      'edit_users_higher_level' => boolean true
      'delete_users_higher_level' => boolean true
      'promote_users_higher_level' => boolean true
      'promote_users_to_higher_level' => boolean true
      'administrator' => boolean true
  public 'filter' => null

Settings used in the REGISTRATION form creator (admin panel)

Profile page as it appears in the frontend

August 14, 2015 at 3:31 pm 67023
MareVisie MareVisie

The following SQL query also returns empty:

SELECT COLUMN_NAME, TABLE_NAME 
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE COLUMN_NAME 
LIKE '%wpuf%'
August 14, 2015 at 5:00 pm 67030
MareVisie MareVisie

I can get the form fields using wpuf_get_form_fields( $id ) however, I can’t find how to get the corresponding values stored in the database

August 17, 2015 at 11:05 am 67483
towhid towhid

Hello MareVisie,

In the “usermeta” table, user’s values are stored (along with any custom fields that are added).

To get the user meta value please use this method get_user_meta().

Please check this link – https://codex.wordpress.org/Function_Reference/get_user_meta

Thanks

August 17, 2015 at 1:29 pm 67567
MareVisie MareVisie

Hi towhid,

Perfect, that’s what I was looking for! Thank you.

August 17, 2015 at 5:45 pm 67645
towhid towhid This reply has been marked as private.
Viewing 9 Posts - 1 through 9 (of 9 total)