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. Check if wp-login is current page
  49. Action hook for custom tax edit
  50. Is there a limit to hook priority?
  51. How to change “You must be logged in to post a comment.”
  52. Auto-retrieve YouTube Image for Thumbnail?
  53. How to check if which hook triggered the call to a function?
  54. Display sortable User meta column in admin panel user’s page
  55. Hooks are not executing
  56. Best possible way to get all options
  57. wordpress custom modules/widget areas on the page? can i make my own?
  58. How to add hook to the_title() and get_the_title()
  59. Hooking after get_header()
  60. How to get post ID in post_updated action hook?
  61. How can I set status=’publish’ for all featured images?
  62. Remove default user registration, login and subscriber profiles
  63. How do I force “users must be registered and logged in” on subsites?
  64. How to find a callback attached to a bbpress hook?
  65. Event Calendar using insert_post_data after save_post and insert_post after post_transition draft_to_schedule
  66. How to extend custom (non-core) blocks?
  67. Hooking into the init action will fire it too frequently?
  68. Implement Hooks Using Array
  69. Is there a JavaScript equivalent of get_post_field?
  70. Show reCaptcha on Custom Frontend Login & Register Form [closed]
  71. Auto Login After Registration
  72. How to distinguish on hook profile_update user registering, user resetting password or user updating profile?
  73. What speaks against using a custom login.php / register.php to wordpress?
  74. Embeding style into the header via the function.php
  75. How do I hook my function to run only after submitting login form
  76. ‘save_post’ hook not working in WP 3.5
  77. Change the Default Plugin page filter to Active intead of All
  78. How to execute a hook asynchronously?
  79. Issues with if, else, and elseif statements
  80. Modifying the wordpress login page and then referencing it with a shortcode problem
  81. “Seen by” Feature in posts [closed]
  82. How to hook in to the “output buffer” and add html content
  83. hook for loading page
  84. What hook to use to redirect based on $post
  85. How can I modify the header of RSS feed items?
  86. remove_action(‘save_post’) in function that was triggered by save post not working
  87. How to get template name or category before publish
  88. How can I insert custom html code inside a div dynamically?
  89. How WordPress understands what do with the (all) key in the $wp_filter array? [duplicate]
  90. WP-Automatic to run publish hooks
  91. Hide post completely and still reach it via cURL
  92. Where do I find “log in” and “register” link which are located on the top right corner?
  93. Why does hook priority affects admin menu permission error?
  94. Integrating Facebook Registration (and Login) on a WordPress page
  95. make a login system for site visitors
  96. How to disable login and registration pages?
  97. How do I do so that people can register on my wordpress site?
  98. Hook on opening a media/document
  99. ‘At a Glance’ dashboard: combining infos
  100. Getting fatal error when using manage_media_columns filter of WordPress
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
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 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