[users & groups] Cleaning opened sessions when deleting user #240

Closed
opened 2026-10-04 23:48:44 +02:00 by adam · 2 comments
Owner

Reported by Jalil on 22 Oct 2013 17:00

Version: 2.5.2

If I delete a user that has an open session, the next refresh or link he clicks displays a crash.
Even if the user tries to load the base URL of the gallery.
He has to clean his cookies in order to be able to access the gallery again :

[code]Warning: array_merge(): Argument #1 is not an array in [...]\include\functions_user.inc.php on line 348 Warning: Invalid argument supplied for foreach() in [...]\include\functions_user.inc.php on line 350 Notice: Undefined index: id in [...]\include\functions_user.inc.php on line 376 Notice: Undefined index: status in [...]\include\functions_user.inc.php on line 376 Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

SELECT cat_id
FROM piwigo_user_access
WHERE user_id =
; in [...]\include\dblayer\functions_mysqli.inc.php on line 834

Fatal error: Call to a member function fetch_assoc() on a non-object in [...]\include\dblayer\functions_mysqli.inc.php on line 181[/code]

His session should be terminated when user account is deleted.

Steps to reproduce: - Open a session with a user account

  • On admin session (other browser/computer), delete that account
  • Back on the first browser/computer, refresh the page.

Piwigo Bugtracker #2983

**Reported by Jalil on 22 Oct 2013 17:00** **Version:** 2.5.2 If I delete a user that has an open session, the next refresh or link he clicks displays a crash. Even if the user tries to load the base URL of the gallery. He has to clean his cookies in order to be able to access the gallery again : [code]Warning: array_merge(): Argument #1 is not an array in [...]\include\functions_user.inc.php on line 348 Warning: Invalid argument supplied for foreach() in [...]\include\functions_user.inc.php on line 350 Notice: Undefined index: id in [...]\include\functions_user.inc.php on line 376 Notice: Undefined index: status in [...]\include\functions_user.inc.php on line 376 Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039;&#039; at line 3 SELECT cat_id FROM piwigo_user_access WHERE user_id = ; in [...]\include\dblayer\functions_mysqli.inc.php on line 834 Fatal error: Call to a member function fetch_assoc() on a non-object in [...]\include\dblayer\functions_mysqli.inc.php on line 181[/code] His session should be terminated when user account is deleted. **Steps to reproduce:** - Open a session with a user account - On admin session (other browser/computer), delete that account - Back on the first browser/computer, refresh the page. [Piwigo Bugtracker #2983](http://piwigo.org/bugs/view.php?id=2983) <!-- github-sync-id:97226678 -->
adam closed this issue 2026-10-04 23:48:44 +02:00
Author
Owner

Comment posted by mistic100 on 22 Oct 2013 18:27

Add a test for the result of the first query of build_user()
If needed, destroy the session and reload the page.

**Comment posted by mistic100 on 22 Oct 2013 18:27** Add a test for the result of the first query of build_user() If needed, destroy the session and reload the page. <!-- github-comment-id:124893276 -->
Author
Owner

duplicate of #383

duplicate of #383 <!-- github-comment-id:183385005 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#240