Skip to content

Commit 219dbcb

Browse files
committed
ACP2E-3509: Admin Actions Log User Report doesnt show details for adminhtml_user_delete
1 parent c176cbb commit 219dbcb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/User/Controller/Adminhtml/User/Delete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function execute()
4141
/** @var \Magento\User\Model\User $model */
4242
$model = $this->_userFactory->create();
4343
$model->setId($userId);
44-
$deletedUser = $this->_userFactory->create()->load($userId);
44+
$deletedUser = $model->load($userId);
4545
$model->delete();
4646
$this->_eventManager->dispatch('log_user_after_delete', [
4747
'deletedUser' => $deletedUser,

app/code/Magento/User/Test/Unit/Controller/Adminhtml/User/DeleteTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function setUp(): void
9292

9393
$this->userMock = $this->getMockBuilder(User::class)
9494
->disableOriginalConstructor()
95-
->onlyMethods(['getId', 'performIdentityCheck', 'delete'])
95+
->onlyMethods(['getId', 'performIdentityCheck', 'delete', 'load'])
9696
->getMock();
9797

9898
$this->userFactoryMock = $this->getMockBuilder(UserFactory::class)

0 commit comments

Comments
 (0)