Actions
Bug #4786
closedWarning JUser: :_load: Unable to load user with ID: --- when deleting user from CB 2.0 User Management
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
Updated by beat about 10 years ago
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.
Updated by beat about 10 years ago
In short: CB Blogs event handler onAfterDeleteUser was trying to load the just deleted user.
Fixing.
Updated by beat about 10 years ago
- Status changed from Assigned to Resolved
- Assignee changed from krileon to beat
- % Done changed from 0 to 100
Fixed in MR !622
Actions