The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
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 . is there any function which allows this? a variable like $user->data()->isfirstlogin where nice to have 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 |