summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2016-04-25 16:30:06 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-21 11:29:50 +0100
commit1700e3dcccc4edbb48f583b055ba3fed539a8b42 (patch)
tree348ac6159040010d4d85e63aa1548e18107c05a0
parent445a254c1e84444134b90b4c874cbf32119e2df1 (diff)
downloadnextcloud-server-1700e3dcccc4edbb48f583b055ba3fed539a8b42.tar.gz
nextcloud-server-1700e3dcccc4edbb48f583b055ba3fed539a8b42.zip
allow multiple values for phone, website, address and email
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--settings/Controller/UsersController.php8
-rw-r--r--settings/personal.php14
2 files changed, 11 insertions, 11 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index 35344234330..6791475ce52 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -534,10 +534,10 @@ class UsersController extends Controller {
$data = [
'avatar' => ['scope' => $avatarScope],
'displayName' => ['value' => $displayname, 'scope' => $displaynameScope],
- 'email' => ['value' => $email, 'scope' => $emailScope],
- 'website' => ['value' => $website, 'scope' => $websiteScope],
- 'address' => ['value' => $address, 'scope' => $addressScope],
- 'phone' => ['value' => $phone, 'scope' => $phoneScope]
+ 'email' => [['value' => $email, 'scope' => $emailScope]],
+ 'website' => [['value' => $website, 'scope' => $websiteScope]],
+ 'address' => [['value' => $address, 'scope' => $addressScope]],
+ 'phone' => [['value' => $phone, 'scope' => $phoneScope]]
];
$this->accountManager->updateUser($userId, $data);
diff --git a/settings/personal.php b/settings/personal.php
index 87e1af36c94..9475b674b75 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -169,16 +169,16 @@ $tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User:
$tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser()));
$tmpl->assign('displayName', OC_User::getDisplayName());
-$tmpl->assign('phone', isset($userData['phone']['value']) ? $userData['phone']['value'] : null);
-$tmpl->assign('website', isset($userData['website']['value']) ? $userData['website']['value'] : null);
-$tmpl->assign('address', isset($userData['address']['value']) ? $userData['address']['value'] : null);
+$tmpl->assign('phone', isset($userData['phone'][0]['value']) ? $userData['phone'][0]['value'] : null);
+$tmpl->assign('website', isset($userData['website'][0]['value']) ? $userData['website'][0]['value'] : null);
+$tmpl->assign('address', isset($userData['address'][0]['value']) ? $userData['address'][0]['value'] : null);
$tmpl->assign('avatarScope', isset($userData['avatar']['scope']) ? $userData['avatar']['scope'] : 'contacts');
$tmpl->assign('displayNameScope', isset($userData['displayName']['scope']) ? $userData['displayName']['scope'] : 'contacts');
-$tmpl->assign('phoneScope', isset($userData['phone']['scope']) ? $userData['phone']['scope'] : 'private');
-$tmpl->assign('emailScope', isset($userData['email']['scope']) ? $userData['email']['scope'] : 'private');
-$tmpl->assign('websiteScope', isset($userData['website']['scope']) ? $userData['website']['scope'] : 'private');
-$tmpl->assign('addressScope', isset($userData['address']['scope']) ? $userData['address']['scope'] : 'private');
+$tmpl->assign('phoneScope', isset($userData['phone'][0]['scope']) ? $userData['phone'][0]['scope'] : 'private');
+$tmpl->assign('emailScope', isset($userData['email'][0]['scope']) ? $userData['email'][0]['scope'] : 'private');
+$tmpl->assign('websiteScope', isset($userData['website'][0]['scope']) ? $userData['website'][0]['scope'] : 'private');
+$tmpl->assign('addressScope', isset($userData['address'][0]['scope']) ? $userData['address'][0]['scope'] : 'private');
$tmpl->assign('enableAvatars', $config->getSystemValue('enable_avatars', true) === true);
$tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser()));