$defaults = \OC::$server->getThemingDefaults();
$certificateManager = \OC::$server->getCertificateManager();
+$accountManager = new \OC\Accounts\AccountManager(\OC::$server->getDatabaseConnection());
$config = \OC::$server->getConfig();
$urlGenerator = \OC::$server->getURLGenerator();
} 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);
$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());