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
parent 6eda6af5c6
commit 00ffad3c60
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

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;
}