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
Delete Users SQL Logic
#1
Hello!

I'm using UserSpice for about a month now, making some changes (will post later in the "Modifications and Hackery") and I found something that I want to share with you guys.

The problem is if you delete an user, can happen that it won't delete the permission_matches/profile entries.

In the us_helpers.php we have a method for deletion of users, in the queries you find:
$query1 = $db->query("DELETE FROM users WHERE id = ?",array($id));
$query2 = $db->query("DELETE FROM user_permission_matches WHERE id = ?",array($id));
$query3 = $db->query("DELETE FROM profiles WHERE id = ?",array($id));

But, for the query2/query3 I think it should be "user_id", instead of just "id".

The version of UserSpice that I'm using is 4.1.2.
I liked a lot UserSpice and also learned a lot with the codes of it! Please keep up with this good work! Smile

PS: Sorry about my english, it's not my first language. Greetings from Brazil. o/

Regards,
Rukichirimoshi
  Reply


Messages In This Thread
Delete Users SQL Logic - by rukichirimoshi - 06-30-2016, 02:02 PM
Delete Users SQL Logic - by mudmin - 07-01-2016, 11:05 AM
Delete Users SQL Logic - by rukichirimoshi - 07-01-2016, 01:18 PM
Delete Users SQL Logic - by brian - 07-09-2016, 07:59 PM
Delete Users SQL Logic - by firestorm - 08-23-2016, 06:12 PM
Delete Users SQL Logic - by mudmin - 08-24-2016, 01:13 AM
Delete Users SQL Logic - by firestorm - 08-24-2016, 02:44 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)