The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (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
How can i determine if a user is new after login
#1
Hey,

i want to display a modal which contains some formular which inserts some user related (and required) data into the database.
this modal should only be displayed after a user successfully registered (or used the social login) and then gets redirected to the main page since the modal is on the main page Smile .
is there any function which allows this?
a variable like $user->data()->isfirstlogin where nice to have Smile
or a script under /usersc/scripts is also a possible solution


  Reply
#2
The users table tracks logins, so you could do something like

Code:
if ($user->data()->logins < 2){
Code:
//do something here
Code:
}
  Reply
#3
I should add, you can do that in usersc/scripts/custom_login_script.php
  Reply
#4
Thank you! its working great Smile
  Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)