The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which file can been used after email verification
#2
(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.
  Reply


Messages In This Thread
RE: which file can been used after email verification - by mudmin - 01-02-2019, 10:18 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)