]> source.dussan.org Git - nextcloud-server.git/commitdiff
allow multiple values for phone, website, address and email
authorBjörn Schießle <schiessle@owncloud.com>
Mon, 25 Apr 2016 14:30:06 +0000 (16:30 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 21 Nov 2016 10:29:50 +0000 (11:29 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
settings/Controller/UsersController.php
settings/personal.php

index 353442343307c407356ba047bc090dcfcf6cf952..6791475ce527700df917213a93936cf50757ce5d 100644 (file)
@@ -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);
index 87e1af36c940d659dea00de5291c2723d92402be..9475b674b7503505a48e92afba777d22b650802d 100644 (file)
@@ -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()));