From c9f5646aaaaef4d75eb71aede5af1b50ca5322a8 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Wed, 12 Feb 2014 09:56:10 +0100 Subject: [PATCH] Closes #24 Fixed others users/groups are not saved when account is being edited by foreign user --- inc/tpl/accounts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/tpl/accounts.php b/inc/tpl/accounts.php index 0558f329..92ed3bbe 100644 --- a/inc/tpl/accounts.php +++ b/inc/tpl/accounts.php @@ -272,7 +272,7 @@ $maxFileSize = round(SP_Config::getValue('allowed_size') / 1024, 1); foreach ( $users as $otherUserName => $otherUserId) { $userSelected = ''; - if ($otherUserId != $accountData->account_userGroupId && $otherUserId != $userId) { + if ($otherUserId != $accountData->account_userGroupId) { if ( isset($accountUsers) && is_array($accountUsers)){ $userSelected = ( in_array($otherUserId, $accountUsers)) ? "selected" : ""; } @@ -299,7 +299,7 @@ $maxFileSize = round(SP_Config::getValue('allowed_size') / 1024, 1); foreach ($groups as $groupName => $groupId) { $uGroupSelected = ''; - if ($groupId != $accountData->account_userGroupId && $groupId != $userGroupId) { + if ($groupId != $accountData->account_userGroupId) { if ( isset($accountGroups) && is_array($accountGroups)){ $uGroupSelected = ( in_array($groupId, $accountGroups)) ? "selected" : ""; }