diff options
author | Björn Schießle <schiessle@owncloud.com> | 2016-04-25 16:07:00 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-21 11:29:43 +0100 |
commit | 445a254c1e84444134b90b4c874cbf32119e2df1 (patch) | |
tree | 0ff534bff6a6be348731785cd89c064bb600fc50 /settings/personal.php | |
parent | 40b99734d3413ecee7c7ae1d71868c801b7c4188 (diff) | |
download | nextcloud-server-445a254c1e84444134b90b4c874cbf32119e2df1.tar.gz nextcloud-server-445a254c1e84444134b90b4c874cbf32119e2df1.zip |
display stored user data
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/settings/personal.php b/settings/personal.php index a18a88a9b63..87e1af36c94 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -40,6 +40,7 @@ OC_Util::checkLoggedIn(); $defaults = \OC::$server->getThemingDefaults(); $certificateManager = \OC::$server->getCertificateManager(); +$accountManager = new \OC\Accounts\AccountManager(\OC::$server->getDatabaseConnection()); $config = \OC::$server->getConfig(); $urlGenerator = \OC::$server->getURLGenerator(); @@ -155,6 +156,8 @@ if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) { } else { $totalSpace = OC_Helper::humanFileSize($storageInfo['total']); } +$userData = $accountManager->getUser($user->getUID()); + $tmpl->assign('total_space', $totalSpace); $tmpl->assign('usage_relative', $storageInfo['relative']); $tmpl->assign('clients', $clients); @@ -165,18 +168,18 @@ $tmpl->assign('activelanguage', $userLang); $tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User::getUser())); $tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser())); $tmpl->assign('displayName', OC_User::getDisplayName()); -// TODO: insert real data -$tmpl->assign('phone', '+43 660 56565 5446'); -$tmpl->assign('website', 'owncloud.org'); -$tmpl->assign('address', 'Stuttgart'); - -$tmpl->assign('avatarScope', 'contacts'); -$tmpl->assign('displayNameScope', 'public'); -$tmpl->assign('phoneScope', 'contacts'); -$tmpl->assign('emailScope', 'contacts'); -$tmpl->assign('websiteScope', 'public'); -$tmpl->assign('addressScope', 'private'); -// END TODO + +$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('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('enableAvatars', $config->getSystemValue('enable_avatars', true) === true); $tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser())); $tmpl->assign('certs', $certificateManager->listCertificates()); |