01-02-2019, 10:18 AM
(01-02-2019, 02:12 AM)Ruud Wrote: Hi,
I want to know which file i can change for creating some database changes after a user is validated bij email.
I use beta 3 of 4.4 and love all the work what is already done.
Grtz Ruud
Thanks for the compliments. Let me think through this. So you could make the changes during user creation in the script usersc/scripts/during_user_creation.php (I think that's the name), but only consider them active if $user->data()->email_verified == 1;
I'm not sure what types of data you're trying to enter, so I'm not sure the absolute best way to do it.
The problem is that with social logins and things like that, "email verified" can happen at several places.
A bit of a hack could be to add a column in the users table like ver_script tinyint(1) which defaults to zero. Then in usersc/includes/head_tags you could do
if(isset $user && $user->isLoggedin() && $user->data()->email_verified == 1 && $user->data()->ver_script == 0){
//run script here
//the last thing you do is to set the ver_script to 1 and it will forever skip that block. The bonus is that if you ever need to get more info or run something on other users, you could just flip ver_script back to 0.
If that doesn't work, let me know, and we can figure something else out.