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
Assigning my Guests User IDs
#7
I'll explain it a bit more and hopefully we can brainstorm something.

Basically when you visit index.php you have the option to continue as Guest but entering your name and pressing "Continue", Logging in or Registering. The user system is great, but not everyone wants to join, so there is guest access, and user access. However, having an account allows you to have access to certain sections, e.g. special headers, additions and edits for templates and what not.

I currently log all clicks, visits, tabs, etc on the site, and this is done from logtemplate.php which submits whatever value via Javascript to this file, and then the file uses if($user->isLoggedIo() to determine whether to use the $user->data()->id or use $user_id = 30; (which is the Guest ID).

However, what I am thinking I want to do is store a value in the logs table if the user_id value is 0 that is some sort of identifier for the user, so this is a value I can submit to the db using my javascript.

Maybe I can make a static table that stores the guests name (which they enter and is stored in the URL as ?marker=NAMEHERE) and whatever identifier I choose to use, so when I pull the log records, I can check this static table for the name value.

Thoughts on how I could achieve this? I really appreciate your input!
  Reply


Messages In This Thread
Assigning my Guests User IDs - by Brandin - 06-06-2017, 12:14 PM
Assigning my Guests User IDs - by mudmin - 06-06-2017, 01:23 PM
Assigning my Guests User IDs - by Brandin - 06-06-2017, 01:31 PM
Assigning my Guests User IDs - by mudmin - 06-06-2017, 07:04 PM
Assigning my Guests User IDs - by Brandin - 06-06-2017, 07:23 PM
Assigning my Guests User IDs - by mudmin - 06-06-2017, 08:15 PM
Assigning my Guests User IDs - by Brandin - 06-06-2017, 10:47 PM
Assigning my Guests User IDs - by mudmin - 06-11-2017, 11:04 AM
Assigning my Guests User IDs - by Brandin - 06-12-2017, 02:54 PM
Assigning my Guests User IDs - by Brandin - 07-20-2017, 11:10 PM
Assigning my Guests User IDs - by karsen - 07-21-2017, 06:47 PM
Assigning my Guests User IDs - by Brandin - 07-21-2017, 07:21 PM
Assigning my Guests User IDs - by karsen - 07-21-2017, 07:52 PM
Assigning my Guests User IDs - by Brandin - 07-22-2017, 09:57 PM
Assigning my Guests User IDs - by Brandin - 08-05-2017, 06:47 PM
Assigning my Guests User IDs - by karsen - 08-05-2017, 09:54 PM
Assigning my Guests User IDs - by mudmin - 08-06-2017, 12:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)