Thanks for your post.
Sorry to say there is no filter or action hook used for checking such action for 3rd party. we should update the plugin for this purpose.
Regards
Thread Starter
kacsa
(@kacsa)
So, I failed to give up, cause I like this plugin so much.
If someone’s interested, I found a way to get it work, with a 99,99999999% success rate:
When an activation key is generated, it is stored in the usermeta table, where I can find the user’s ID based on the activation key meta value. I could then use the ID to link the two DBs.
I know that there’s a chance that two users can get the same key, but the probability of that is so low, I’m willing to take the risk 🙂
Regards,
Kacsa
Thread Starter
kacsa
(@kacsa)
While, I’m at it:
If I’d try to modify the action-uv-registration.php file after the lines:
update_user_meta( $user_id, 'user_activation_key', $user_activation_key );
update_user_meta( $user_id, 'user_activation_status', 0 );
adding something like:
$conn = mysqli_connect("localhost", "user", "pass", "wp");
$result = mysqli_query($conn, "SELECT user_id FROM wp.wp_usermeta WHERE meta_value='$user_activation_key'");
if($result->num_rows > 1) {
$user_activation_key = md5(uniqid('', true) );
update_user_meta( $user_id, 'user_activation_key', $user_activation_key );
}
mysqli_close($conn);
Would that generate a new key and update the value if it finds one already in that table? Or am I completely on the wrong track here?
If it’s a more complicated issue, then no worries, I’ll leave it as it is now.
Regards,
Kacsa