Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/settings/lib/Controller/UsersController.php20
-rw-r--r--apps/settings/tests/Controller/UsersControllerTest.php10
2 files changed, 13 insertions, 17 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php
index d2f16838717..2ea3ada4f08 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -395,15 +395,21 @@ class UsersController extends Controller {
$data = $this->accountManager->getUser($user);
$beforeData = $data;
- $data[IAccountManager::PROPERTY_AVATAR] = ['scope' => $avatarScope];
+ $data[IAccountManager::PROPERTY_AVATAR]['scope'] = $avatarScope;
if ($this->config->getSystemValue('allow_user_to_change_display_name', true) !== false) {
- $data[IAccountManager::PROPERTY_DISPLAYNAME] = ['value' => $displayname, 'scope' => $displaynameScope];
- $data[IAccountManager::PROPERTY_EMAIL] = ['value' => $email, 'scope' => $emailScope];
+ $data[IAccountManager::PROPERTY_DISPLAYNAME]['value'] = $displayname;
+ $data[IAccountManager::PROPERTY_DISPLAYNAME]['scope'] = $displaynameScope;
+ $data[IAccountManager::PROPERTY_EMAIL]['value'] = $email;
+ $data[IAccountManager::PROPERTY_EMAIL]['scope'] = $emailScope;
}
- $data[IAccountManager::PROPERTY_WEBSITE] = ['value' => $website, 'scope' => $websiteScope];
- $data[IAccountManager::PROPERTY_ADDRESS] = ['value' => $address, 'scope' => $addressScope];
- $data[IAccountManager::PROPERTY_PHONE] = ['value' => $phone, 'scope' => $phoneScope];
- $data[IAccountManager::PROPERTY_TWITTER] = ['value' => $twitter, 'scope' => $twitterScope];
+ $data[IAccountManager::PROPERTY_WEBSITE]['value'] = $website;
+ $data[IAccountManager::PROPERTY_WEBSITE]['scope'] = $websiteScope;
+ $data[IAccountManager::PROPERTY_ADDRESS]['value'] = $address;
+ $data[IAccountManager::PROPERTY_ADDRESS]['scope'] = $addressScope;
+ $data[IAccountManager::PROPERTY_PHONE]['value'] = $phone;
+ $data[IAccountManager::PROPERTY_PHONE]['scope'] = $phoneScope;
+ $data[IAccountManager::PROPERTY_TWITTER]['value'] = $twitter;
+ $data[IAccountManager::PROPERTY_TWITTER]['scope'] = $twitterScope;
try {
$data = $this->saveUserSettings($user, $data);
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php
index 81592c28603..48c6fba1894 100644
--- a/apps/settings/tests/Controller/UsersControllerTest.php
+++ b/apps/settings/tests/Controller/UsersControllerTest.php
@@ -330,16 +330,12 @@ class UsersControllerTest extends \Test\TestCase {
$expectedProperties[IAccountManager::PROPERTY_AVATAR]['scope'] = $avatarScope;
$expectedProperties[IAccountManager::PROPERTY_PHONE]['value'] = $phone;
$expectedProperties[IAccountManager::PROPERTY_PHONE]['scope'] = $phoneScope;
- unset($expectedProperties[IAccountManager::PROPERTY_PHONE]['verified']);
$expectedProperties[IAccountManager::PROPERTY_WEBSITE]['value'] = $website;
$expectedProperties[IAccountManager::PROPERTY_WEBSITE]['scope'] = $websiteScope;
- unset($expectedProperties[IAccountManager::PROPERTY_WEBSITE]['verified']);
$expectedProperties[IAccountManager::PROPERTY_ADDRESS]['value'] = $address;
$expectedProperties[IAccountManager::PROPERTY_ADDRESS]['scope'] = $addressScope;
- unset($expectedProperties[IAccountManager::PROPERTY_ADDRESS]['verified']);
$expectedProperties[IAccountManager::PROPERTY_TWITTER]['value'] = $twitter;
$expectedProperties[IAccountManager::PROPERTY_TWITTER]['scope'] = $twitterScope;
- unset($expectedProperties[IAccountManager::PROPERTY_TWITTER]['verified']);
$this->mailer->expects($this->once())->method('validateMailAddress')
->willReturn(true);
@@ -405,22 +401,16 @@ class UsersControllerTest extends \Test\TestCase {
$expectedProperties[IAccountManager::PROPERTY_AVATAR]['scope'] = $avatarScope;
$expectedProperties[IAccountManager::PROPERTY_DISPLAYNAME]['value'] = $displayName;
$expectedProperties[IAccountManager::PROPERTY_DISPLAYNAME]['scope'] = $displayNameScope;
- unset($expectedProperties[IAccountManager::PROPERTY_DISPLAYNAME]['verified']);
$expectedProperties[IAccountManager::PROPERTY_EMAIL]['value'] = $email;
$expectedProperties[IAccountManager::PROPERTY_EMAIL]['scope'] = $emailScope;
- unset($expectedProperties[IAccountManager::PROPERTY_EMAIL]['verified']);
$expectedProperties[IAccountManager::PROPERTY_PHONE]['value'] = $phone;
$expectedProperties[IAccountManager::PROPERTY_PHONE]['scope'] = $phoneScope;
- unset($expectedProperties[IAccountManager::PROPERTY_PHONE]['verified']);
$expectedProperties[IAccountManager::PROPERTY_WEBSITE]['value'] = $website;
$expectedProperties[IAccountManager::PROPERTY_WEBSITE]['scope'] = $websiteScope;
- unset($expectedProperties[IAccountManager::PROPERTY_WEBSITE]['verified']);
$expectedProperties[IAccountManager::PROPERTY_ADDRESS]['value'] = $address;
$expectedProperties[IAccountManager::PROPERTY_ADDRESS]['scope'] = $addressScope;
- unset($expectedProperties[IAccountManager::PROPERTY_ADDRESS]['verified']);
$expectedProperties[IAccountManager::PROPERTY_TWITTER]['value'] = $twitter;
$expectedProperties[IAccountManager::PROPERTY_TWITTER]['scope'] = $twitterScope;
- unset($expectedProperties[IAccountManager::PROPERTY_TWITTER]['verified']);
$this->mailer->expects($this->once())->method('validateMailAddress')
->willReturn(true);