Bug #4786
closed
Warning JUser: :_load: Unable to load user with ID: --- when deleting user from CB 2.0 User Management
Added by nant about 10 years ago.
Updated about 10 years ago.
Start date:
22 October 2014
Description
With latest CB 2.0 nightly build if I go to CB User Management page and select a user to delete I see the message:
Warning
JUser: :_load: Unable to load user with ID: 804
right before the success message.
See attached screenshot.
Files
Happens on both J33 and J25
Bug is in CB Blogs in event onAfterDeleteUser: It tries to load that user after it has been deleted:
onAfterDeleteUser calls function deleteBlogs which calls function getBlogs with $user and $viewer being the deleted CB UserTable $user which has this line:
. ( ( ! Application::User( (int) $viewer->get( 'id' ) )->isGlobalModerator() ) && ( $viewer->get( 'id' ) != $user->get( 'id' ) ) ? ...
Inverting the two like this:
. ( ( $viewer->get( 'id' ) != $user->get( 'id' ) ) && ( ! Application::User( (int) $viewer->get( 'id' ) )->isGlobalModerator() )? ...
fixes this.
In short: CB Blogs event handler onAfterDeleteUser was trying to load the just deleted user.
Fixing.
- Status changed from Assigned to Resolved
- Assignee changed from krileon to beat
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF