adjust access permissions of new controller method

- fixes wrong veriable usage also

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2021-06-29 13:55:03 +02:00 committed by backportbot[bot]
parent 3550b12e3e
commit cc1d24a008

View file

@ -604,6 +604,10 @@ class UsersController extends AUserData {
}
/**
* @NoAdminRequired
* @NoSubAdminRequired
* @PasswordConfirmationRequired
*
* @throws OCSException
*/
public function editUserMultiValue(
@ -663,7 +667,7 @@ class UsersController extends AUserData {
$mailCollection = $userAccount->getPropertyCollection(IAccountManager::COLLECTION_EMAIL);
$targetProperty = null;
foreach ($mailCollection->getProperties() as $property) {
if ($property->getValue() === $value) {
if ($property->getValue() === $key) {
$targetProperty = $property;
break;
}