The following warnings occurred: | ||||||||||||||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Modifying Logged In Users - 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: Modifying Logged In Users (/showthread.php?tid=502) Pages:
1
2
|
Modifying Logged In Users - Brandin - 03-20-2017 Hey, Although this doesn't happen all the time, there are instances I create test or dev users, and remove them, and then I get these errors in my past 24 hour users: "Notice: Undefined offset: 0 in /home/aircentralized/public_html/boss/users/classes/DB.php on line 155 Notice: Trying to get property of non-object in /home/aircentralized/public_html/boss/users/helpers/helpers.php on line 67" How can I replicate this? Can we modify the function that if no user_id exists we just put a value? Thank you! Modifying Logged In Users - mudmin - 03-23-2017 How are you deleting these users? Modifying Logged In Users - Brandin - 03-23-2017 admin_users.php Modifying Logged In Users - mudmin - 03-23-2017 Well, two things. 1. That's coming from the name_from_id function. I need to figure out where that's being called. 2. I haven't looked at the top of that file since I did it a year ago. I forgot a lot of those great functions are in there. I need to go back through and use/document some of those cool functions. Modifying Logged In Users - Brandin - 03-23-2017 Haha well as long as we get it figured out eventually. It's not the end of the world because its only on the dashboard, and I don't delete users all the time. It just so happened I had deleted one at the time right after it was logged in Thanks! Modifying Logged In Users - mudmin - 03-25-2017 See if this works better for login.php http://pastebin.com/tqGSfqnj Modifying Logged In Users - Brandin - 03-25-2017 This resolves my logged in users visiting the login page error, but it doesn't fix my offset error for deleted users. Modifying Logged In Users - mudmin - 03-26-2017 Yeah. I'm on vacation...I didn't even try to fix that one. I need to update the last 24 thing with the echoUser function because it's smart enough to put a "-" if the user's id isn't found. Modifying Logged In Users - mudmin - 03-26-2017 You can try going into admin.php and changing line 395 from Code: $username=name_from_id($v1->user_id); to Code: $username = echouser($v1->user_id); and see if that fixes it. A better fix might be Code: $username = echouser($v1->user_id); Code: if($username == '-'){ Code: $user_id = 0; Code: } Modifying Logged In Users - Brandin - 03-26-2017 Both of those resolve the errors, but then allow no usernames to be present. Enjoy your vacation, work on this when you get back |