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
Another delete user bug
#1
Hey developers,

After the admin deletes a user from admin_users.php, there is an error on the page saying:


Notice: Undefined variable: validation in D:\wwwroot\SET_Apps\users\admin_users.php on line 176

Fatal error: Uncaught Error: Call to a member function errors() on null in D:\wwwroot\SET_Apps\users\admin_users.php:176 Stack trace: #0 {main} thrown in D:\wwwroot\SET_Apps\users\admin_users.php on line 176

I looked into admin_users.php and changed line 175 from this:

if (!$form_valid && Input::exists()){

to:

if (!$form_valid && Input::exists() && isset($validation)){

Now the error is gone. Please let me know if this is a bad fix.

Thanks
Angel
  Reply
#2
After I fix this bug I found that on the same page after deleting a user, the input fields in "Manually Add User" section is displaying some weird error notices. So I added these few lines in admin_users.php around line 41:

$username = '';
$fname = '';
$lname = '';
$email = '';

This is inside the delete users if loop that looks like this:
if ($deletion_count = deleteUsers($deletions)){

Then the error is gone. Not sure if this is a good fix. Please let me know if you have a better solution.

Thanks
Angel

  Reply
#3
Weird, sometimes my posts don't show up. Are you still on 4.1.3? @mudmin might be best to look at this since some admin_users.php bugs were fixed in more recent releases. I will let him weigh in first before digging in.
  Reply
#4
Yeah I'm still on 4.1.3.

Thanks
  Reply
#5
Yep. There were bug patches for that stuff in both 4.1.4 and maybe even 4.1.5. I would update if you can. If not, you can see all the code changes in 4.1.4 here
https://github.com/mudmin/UserSpice4/com...c9e316907f

and 4.1.5 here...

https://github.com/mudmin/UserSpice4/com...25d5f7a2b3
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)