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:
- Post-Registration, post-meta hook?
- How can I do customizations on login, registration and password recovery forms?
- How to hook into user registration process Before user registers
- Does wp_login hook fire on user registration?
- Is there a hook that runs after a user logs in?
- Is there a hook before the user is authenticated?
- WordPress auto login after registration not working
- Run javascript code after wp_login hook?
- How to get user-meta from Social Login registered users?
- after login that will redirect user role into a page
- update post meta using user_register hook not working
- How to modify an add_action() inside a loop of core function
- How to increase password requirements for registration [closed]
- Can user_register output the password?
- Firing a function AFTER redirect
- Detect change to user_meta and retrieve old and new values
- How to get session token of current user in wp_login hook?
- Custom action on login and “remember me”
- How to hook in after user’s registration email has been sent?
- Update a costume wp_usermeta key back to 0 every 24hours (time can be specified as needed)
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- Save User Meta Email Address in Lowercase
- register_activation_hook not updating
- Add default user field to WooCommerce checkout [closed]
- Custom Front End Registration – How Does the Key work in the Password Set Request?
- How to change the default mail when admin approuved an user?
- Lock user information once fields have been filled in
- Send along login credentials with comment content
- Registration Hooks don’t appear to be working
- Is it possible to add the_content filter upon login?
- How to get user meta fields that have just been updated?
- Associate multiple email addresses with the same user account, so they can log in with either
- hooks for automatic approve user registration according to data in custom fields
- What hooks do I need to hook into to capture ever wp_user creation/change?
- Linking form to user meta fields
- Delay action unltil the untill previous (hoocked) action is completed
- ‘user_register’ hook – need to distinguish if created from wp admin panel
- add_action doesn’t work for my function
- wp_get_current_user Not working
- Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- Problem in register activation hook and Copying folder
- How to add a new link to the default register form’s footer links?
- Changing login url
- Change password reqts with NO plugin without breaking resetpass link?
- How to get WordPress’ hooks/actions run sequence?
- How to prefill WordPress registration with social details
- How many times can I hook into the same action?
- Hook into WordPress update?
- Init action hook running late after PayPal’s return url?
- Can I hook inside another hook?
- Adding function directly vs using hook in function.php
- What is the action hook for save media-form on gallery tab?
- Check if action hook exists before adding actions to it
- User defined password at registration – registration email sends auto generated pass
- hook to get (and change) the search string before processing
- Is there a recover_post hook to go with trash_post hook?
- hooks & filters and variables
- Run add_action hook if condition
- Gutenberg gallery hook errors
- How do I redirect a user when he is logged in after clicking on a menu
- How to use do_action_ref_array?
- Update post meta using pending_to_publish hook
- Get log of function/method calls made by do_action() on WordPress initialization
- User update hook
- Redirect customer to login if not logged in when proceeding to checkout
- How to Access wp_usermeta Data Immediately After a New User is Created
- Login/Register redirect user with message
- PHP header() gives headers already sent
- How to replace a function using a child theme?
- WP_query hooks before execute a search query
- How to use a 3rd party library to send emails?
- Should `wp_login` be used since it’s deprecated?
- I would like to send a notification email (Asana) whenever something is published (posts, pages, custom post types) [duplicate]
- Use a variable created in get_header to calculate stuff in wp_footer
- How to use a WooCommerce action hook?
- How to add fields in custom registration form, validate it and aave to db? [closed]
- Force file download in WordPress
- call php file from form and use wp functions
- wp_insert_post hook for a wordpress plugin
- WordPress add_action the_post hook
- Post via wp-admin and via iOS app, same hooks and triggers involved?
- add_action hook for links.php page
- Hooking after blog info update
- Hook to add_action(‘updated_option_my_option’, [$this, ‘save_data’], 10, 3]);
- Session management issues with WordPRess 404 Error page
- Template_redirect works, but headers aren’t sent when checking via cURL
- template_redirect hooks redirect wrong URL
- Create WordPress User in backend, and automatically create a new post in Custom Post Type with user uame as the Title in the post
- Registered custom dynamic tag not appearing
- How to hook add_action() into after category description with id?
- Easy Digital Downloads – How to use hooks correctly?
- Updating a related post’s “post_modified” value
- Send email to post author 1 day before his project ends
- can’t access dashboard and showing forbidden page
- Change Title Type
- What is meaning of BEFORE and AFTER in this hook name?
- Add custom input field in new user page
- Removing script tags that are loaded by other script tag
- wp_trash_post not firing as expected (also applies to trashed_post)