Skip to content

Commit

Permalink
Fixed issue: [security] Administrator can self-delete
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jun 15, 2023
1 parent b4e992a commit 09e4799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/controllers/UserManagementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public function actionDeleteUser()
['errors' => [gT("You do not have permission to access this page.")], 'noButton' => true]
);
}
$userId = Yii::app()->request->getPost('userid');
$userId = (int) Yii::app()->request->getPost('userid');
if ($userId == Yii::app()->user->id) {
return App()->getController()->renderPartial('/admin/super/_renderJson', [
'data' => [
Expand Down

0 comments on commit 09e4799

Please sign in to comment.