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
/printthread.php 16 require_once



UserSpice
How can i determine if a user is new after login - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: How can i determine if a user is new after login (/showthread.php?tid=545)



How can i determine if a user is new after login - chwzr - 04-27-2017

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





How can i determine if a user is new after login - mudmin - 04-27-2017

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

Code:
if ($user->data()->logins < 2){
Code:
//do something here
Code:
}



How can i determine if a user is new after login - mudmin - 04-27-2017

I should add, you can do that in usersc/scripts/custom_login_script.php



How can i determine if a user is new after login - chwzr - 04-30-2017

Thank you! its working great Smile