Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Updating user meta data from external link, user not logged in

I’m not entirely clear on what you’re trying to do, but it seems you want to pass the user’s email address via a query string and determine the user by that. You can get the user’s ID for writing user meta values from the email value. Use the function get_user_by() to retrieve the user object by the user’s email.

$email = ( isset( $_GET['login'] ) ) ? $_GET['login'] : false;

$user = get_user_by( 'email', $email );

if ( $user ) {
    update_user_meta( $user->ID, 'meta_key_to_save', $value );
}

Related Posts:

  1. Post-Registration, post-meta hook?
  2. How can I do customizations on login, registration and password recovery forms?
  3. How to hook into user registration process Before user registers
  4. Does wp_login hook fire on user registration?
  5. Is there a hook that runs after a user logs in?
  6. Is there a hook before the user is authenticated?
  7. WordPress auto login after registration not working
  8. Run javascript code after wp_login hook?
  9. How to get user-meta from Social Login registered users?
  10. after login that will redirect user role into a page
  11. update post meta using user_register hook not working
  12. How to modify an add_action() inside a loop of core function
  13. How to increase password requirements for registration [closed]
  14. Can user_register output the password?
  15. Firing a function AFTER redirect
  16. Detect change to user_meta and retrieve old and new values
  17. How to get session token of current user in wp_login hook?
  18. Custom action on login and “remember me”
  19. How to hook in after user’s registration email has been sent?
  20. Update a costume wp_usermeta key back to 0 every 24hours (time can be specified as needed)
  21. Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
  22. Save User Meta Email Address in Lowercase
  23. register_activation_hook not updating
  24. Add default user field to WooCommerce checkout [closed]
  25. Custom Front End Registration – How Does the Key work in the Password Set Request?
  26. How to change the default mail when admin approuved an user?
  27. Lock user information once fields have been filled in
  28. Send along login credentials with comment content
  29. Registration Hooks don’t appear to be working
  30. Is it possible to add the_content filter upon login?
  31. How to get user meta fields that have just been updated?
  32. Associate multiple email addresses with the same user account, so they can log in with either
  33. hooks for automatic approve user registration according to data in custom fields
  34. What hooks do I need to hook into to capture ever wp_user creation/change?
  35. Linking form to user meta fields
  36. Delay action unltil the untill previous (hoocked) action is completed
  37. ‘user_register’ hook – need to distinguish if created from wp admin panel
  38. add_action doesn’t work for my function
  39. wp_get_current_user Not working
  40. Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
  41. Which hook should I use for this scenario regarding the registration process and account/profile update?
  42. Problem in register activation hook and Copying folder
  43. How to add a new link to the default register form’s footer links?
  44. Changing login url
  45. Change password reqts with NO plugin without breaking resetpass link?
  46. Prefix user login_name and validate it is unique on Registration
  47. is_user_logged_in() doesn’t work after custom login and redirect
  48. Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
  49. How to get WordPress’ hooks/actions run sequence?
  50. Check if wp-login is current page
  51. Where can I find a list of WordPress hooks?
  52. Is there a save_post hook for custom post types?
  53. Where is the right place to register/enqueue scripts & styles
  54. How to know what functions are hooked to an action/filter?
  55. How to hook update_post_meta and delete_post_meta?
  56. Are there any hooks that alter the 404 logic?
  57. Difference between do_action and add_action
  58. WP Cron Doesn’t Execute When Time Elapses
  59. WooCommerce: change display order of product short description and price [closed]
  60. Separate registration and login for different roles
  61. SSO / authentication integration with external ‘directory service’
  62. Why do some hooks not work inside class context?
  63. Adding fields to the “Add New User” screen in the dashboard
  64. Difference between after_setup_theme and init action hooks?
  65. get $post in init filter or action?
  66. Use wp init hook to call other hooks?
  67. How to prefill WordPress registration with social details
  68. How many times can I hook into the same action?
  69. How do I implement the WordPress Iris picker into my plugin on the front-end?
  70. How to intercept a 404 error
  71. Move excerpt meta box to above content editor
  72. Action hook for custom tax edit
  73. Trigger custom action when setting button pressed
  74. What is “all” in isset($wp_filter[‘all’])
  75. Whats worth using add_action when we can simply use add_filter?
  76. Is there a limit to hook priority?
  77. Please explain how these hooks work
  78. How to change “You must be logged in to post a comment.”
  79. Show admin notice if metabox field is empty during save post
  80. The enqueue_block_assets is changing the styles of the editor interface
  81. update ACF field when saving post on back office
  82. Unable to trigger a frontend @wordpress/hooks action
  83. Redirecting after login except for a specific page
  84. Replacing specific Gutenberg blocks
  85. generate an array of user login date using update_user_meta();
  86. Hook to Use Second Field Before Fallback
  87. Is there a plugin or resource for custom implementation for OAUTH and regular user login?
  88. Webhooks – Differ between new/existing updates
  89. Skipping all WP functions for a cached version
  90. How to modify username before logging in?
  91. How do I modify the TinyMCE editor Add Media button to insert a thumbnail preview of PDFs in addition to a text link?
  92. I’m trying to register with AJAX
  93. Getting fatal error when using manage_media_columns filter of WordPress
  94. change the time of the default wordpress crons
  95. Include New Meta Field In New User Registration Email
  96. HowTo modify BlockEdit-Component in Filter-Hooks for core-block Extensions
  97. Appropriate WP hook to use set PHP cookie
  98. dashboard_activity hook
  99. Hide Description field for custom taxonomy?
  100. How to expose hooks to @wordpress/hooks?
Categories hooks Tags hooks, login, user-meta, user-registration
Doesn’t call user information to include “wp-load.php” in an external php file
Can’t get parent page id

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress