You need to make sure the new ID of the user in the user table matches the foreign key in the usermeta.
Also a word of caution regarding your comment on Active Directory integration. For public facing websites be extremely careful, you could inadvertantly expose you domain controller information to the web. You might want to consider additional security precautions around the login and admin pages, for example limiting access to certain IP addresses or dual authentication.
Related Posts:
- How to customize wp_signon()
- Displaying different in-page content to cliente/admin
- Unique password to access a section site
- view and update form only for registered users
- MySQL query to list users who never signed in
- Wordpres password as plain text in email
- WordPress password as plain text in email
- How to allow an user role to create a new user under a role which lower than his level only?
- How to programatically change username (user_login)?
- Display user registration date
- Whats the best way to share user data across multiple WordPress websites?
- WordPress auto login after registration not working
- Disallowing Users of a Custom Role from Deleting or Adding Administrators?
- What the user_status column?
- Hide Admin Menu for Specific User ID who has administrator Role
- Problem with Hebrew characters in username
- Remove email verification when new user register
- How to set up User email verification after Signup?
- How to let user set password on registration
- How to display custom user meta from registration in backend?
- Allowing an email as the username?
- Check if specific username is logged in
- Post list based on the user that is logged in
- How do i auto approve new user?
- Can I hook into the invite user process to verify their email address is from a certain domain?
- How to get user ID during registration and add it to a custom table
- Front end user meta options for users
- Limit content by user registration date
- What is the best way to avoid spammers registering to my blog?
- ACF Upload Image in front-end with custom form
- Set default page for user account in admin
- Can I bulk register contributors for a new blog
- New user notification doesn’t include activation link
- WordPress to use Drupal users’ credentials
- Create not-activated user in code, wordpress
- Hide everything on site for visitors except specific page IDs
- Managing Users and Creating Groups [closed]
- show text If special user is logged
- Upgrade Nightmare – No Posts, Permissions Issues and Can’t Create a new post
- Restricted registrations or removing the ability to edit your password/email
- Creating user in Firebase after WordPress user registration
- Can user login details be used for other applications?
- Allow user access to Dashboard only!
- Restrict access of admin uploads to certain logged-in users?
- wordpress user roles are not working
- Can i add password field into my wp registration form?
- wordpress disable login for unverified user
- Problem with automatic role change through cron job
- Reset Password policy
- How can I attach a user to another user with user meta
- How can I allow an User to publish only 5 posts per month?
- Register user when after filling contact form
- Creating user without username and password
- WordPress registration without wp-login.php and wp-admin folder, is it possible?
- Where are $current_user->allcaps set?
- Check for valid email after user inactivity?
- Assign random (and unique) user meta upon registration
- How do you manage your pages or functions that require logged-in users?
- What is correct way to change user’s email?
- Send clear password via mail
- Allow admins to login as other users
- How to programmatically read the plan text password when user register?
- Can I Create a Second Admin Level User Role?
- Custom registration and pending approval
- Delete a user from frontend
- Make new users automatically approved
- Adding more fields to the add user page on dashboard
- Using my own user table
- User with same Mail but a different additional info(like domain)
- set automatically email address for WordPress users
- WordPress 5.8 – Hide or Remove personal fields from admin Profile page
- Can I add a unique code for each user based on the location?
- Send user auto generated password on different email
- How can i display pagination in custom comment list?
- Safely changing UserID’s, re-using deleted UserID’s and automatically using deleted userID’s instead of an increment
- Single Sign On (SSO) between two WordPress websites
- Disable emails for new user registration
- Users getting linked unwanted to main mu in WordPress multisite (WPMU)
- What is the best user experience for user to perform an action using email?
- Custom User Role: Can Edit Own Page, Cannot Create New
- How to restrict Admin from creating new users from Add new user screen in dashboard to only of one domain?
- Registration page as homepage
- WordPress install checking permissions of user id 0
- Allowing users to edit only their page and nobody else’s
- How to bulk change user role to “No role for this site”
- Restrict Access to the User Profile
- New User ID not working in custom function with user_register hook
- Username has been exposed
- Set user role on registration so can upload file to own media library area
- Disallow user registration/checkout via Hotmail/Yahoo
- Retrieve New user’s ID
- Let admin users edit member profiles from front end
- Control Category of each user can post
- Integrating Facebook Registration (and Login) on a WordPress page
- Limit user access to installing/configuring a plugin?
- New User Registration email
- Add custom input field in new user page
- determine active user browser at the same time
- (How) does WordPress protect direct access of user data?
- How to remove/limit Editor accounts privileges, to prevent them from deleting media and pages created by Admin