mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Contacts: Cache user in js config
This commit is contained in:
parent
ee8cded40e
commit
55f4ebfa41
@ -24,11 +24,13 @@ OCP\JSON::setContentTypeHeader('text/javascript');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('contacts');
|
||||
|
||||
echo 'var contacts_groups_sortorder=[' . OCP\Config::getUserValue(OCP\USER::getUser(), 'contacts', 'groupsort', '') . '],';
|
||||
$user = OCP\User::getUser();
|
||||
|
||||
echo 'var contacts_groups_sortorder=[' . OCP\Config::getUserValue($user, 'contacts', 'groupsort', '') . '],';
|
||||
echo 'contacts_properties_indexed = '
|
||||
. (OCP\Config::getUserValue(OCP\USER::getUser(), 'contacts', 'contacts_properties_indexed', 'no') === 'no'
|
||||
. (OCP\Config::getUserValue($user, 'contacts', 'contacts_properties_indexed', 'no') === 'no'
|
||||
? 'false' : 'true') . ',';
|
||||
echo 'contacts_categories_indexed = '
|
||||
. (OCP\Config::getUserValue(OCP\USER::getUser(), 'contacts', 'contacts_categories_indexed', 'no') === 'no'
|
||||
. (OCP\Config::getUserValue($user, 'contacts', 'contacts_categories_indexed', 'no') === 'no'
|
||||
? 'false' : 'true') . ',';
|
||||
echo 'lang=\'' . OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en') . '\';';
|
||||
echo 'lang=\'' . OCP\Config::getUserValue($user, 'core', 'lang', 'en') . '\';';
|
||||
|
Loading…
Reference in New Issue
Block a user