martinpweb
Forum Replies Created
-
Could it be that the um hides the user_id once the activation link is clicked. Cause when I hover over the activation link in my email (I can see the url contains user_id at the bottom left corner of the screen).
Immediately I click the activation link and it opens on a new tab the user_id disappears on the url.
I have copied your code and tested it, am getting the activation email. Once I click on the activation link, it opens this URL on a different tab: https://wplocaltheme.test/activate
Am not sure why it did not append the user_id to something like this: https://wplocaltheme.test/activate/user_id=23 ,so that I can retrieve the user_id using some Javascript and fetch the record from the database based on user_id ?
Thank you for your response, Yes , I have set the Role “Login user after validating the activation link?” to true. However, I have the code below in my functions.php file. I want the user_id to be appended at the end of url after the activation link is clicked
//Change Activation Link
function change_url( $url ) {
$user_id = get_current_user_id();
$url_new = ‘https://wplocaltheme.test/’ . $user_id;
return $url_new;
}
add_filter( ‘um_activate_url’, ‘change_url’, 10, 1 );
Seems not to work