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?
- Prefix user login_name and validate it is unique on Registration
- is_user_logged_in() doesn’t work after custom login and redirect
- Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
- How to get WordPress’ hooks/actions run sequence?
- Check if wp-login is current page
- Where can I find a list of WordPress hooks?
- Is there a save_post hook for custom post types?
- Where is the right place to register/enqueue scripts & styles
- How to know what functions are hooked to an action/filter?
- How to hook update_post_meta and delete_post_meta?
- Are there any hooks that alter the 404 logic?
- Difference between do_action and add_action
- WP Cron Doesn’t Execute When Time Elapses
- WooCommerce: change display order of product short description and price [closed]
- Separate registration and login for different roles
- SSO / authentication integration with external ‘directory service’
- Why do some hooks not work inside class context?
- Adding fields to the “Add New User” screen in the dashboard
- Difference between after_setup_theme and init action hooks?
- get $post in init filter or action?
- Use wp init hook to call other hooks?
- How to prefill WordPress registration with social details
- How many times can I hook into the same action?
- How do I implement the WordPress Iris picker into my plugin on the front-end?
- How to intercept a 404 error
- Move excerpt meta box to above content editor
- Action hook for custom tax edit
- Trigger custom action when setting button pressed
- What is “all” in isset($wp_filter[‘all’])
- Whats worth using add_action when we can simply use add_filter?
- Is there a limit to hook priority?
- Please explain how these hooks work
- How to change “You must be logged in to post a comment.”
- Show admin notice if metabox field is empty during save post
- The enqueue_block_assets is changing the styles of the editor interface
- update ACF field when saving post on back office
- Unable to trigger a frontend @wordpress/hooks action
- Redirecting after login except for a specific page
- Replacing specific Gutenberg blocks
- generate an array of user login date using update_user_meta();
- Hook to Use Second Field Before Fallback
- Is there a plugin or resource for custom implementation for OAUTH and regular user login?
- Webhooks – Differ between new/existing updates
- Skipping all WP functions for a cached version
- How to modify username before logging in?
- How do I modify the TinyMCE editor Add Media button to insert a thumbnail preview of PDFs in addition to a text link?
- I’m trying to register with AJAX
- Getting fatal error when using manage_media_columns filter of WordPress
- change the time of the default wordpress crons
- Include New Meta Field In New User Registration Email
- HowTo modify BlockEdit-Component in Filter-Hooks for core-block Extensions
- Appropriate WP hook to use set PHP cookie
- dashboard_activity hook
- Hide Description field for custom taxonomy?
- How to expose hooks to @wordpress/hooks?