Send activation email to user after signup [duplicate]
IT Nursery
May 12, 2022
0
I would like to send an email to all users immediately after they signup that requires them to click a link inside that email to “activate” their email address.
Ideally each user account would have a status showing whether this had been completed or not.
Can anyone recommend a way for me to accomplish this?
1 Answer 1
For activation process you can follow following steps:
As you can see user_activation_key column in wp_users table. You can make use of that column for sending user activation link.
While signing up users you can insert certain code into that column
with custom sql. After the user is signed up with wp_insert_user() and returns an id to $user_id, a custom insert
sql can be run
This will send user an activation link like http://example.com/activation-page/?key=CERTAIN_KEY&user=USER_ID to their email and on the activation page you can run code for activating the users by altering another column user_status from 0 to 1.
After this you can run for another update for user_status column by