Skip to content

Commit

Permalink
Merge pull request #189 from Wachizungu/chg-load-current-user-setting…
Browse files Browse the repository at this point in the history
…s-view-in-case-id-unset

fix: users settings view throws internal server error when accessed w…
  • Loading branch information
iglocska authored Nov 23, 2024
2 parents 55cac2e + a1020bc commit 1702b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public function settings($user_id=false)
{
$editingAnotherUser = false;
$currentUser = $this->ACL->getUser();
if ((empty($currentUser['role']['perm_community_admin']) && empty($currentUser['role']['perm_group_admin'])) || $user_id == $currentUser->id) {
if ((empty($currentUser['role']['perm_community_admin']) && empty($currentUser['role']['perm_group_admin'])) || empty($user_id) || $user_id == $currentUser->id) {
$user = $currentUser;
} else {
$user = $this->Users->get($user_id, [
Expand Down

0 comments on commit 1702b84

Please sign in to comment.