aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-05-07 20:29:51 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-05-08 09:44:51 +0200
commit278c281cc9c03ad060ac6a91784058066411c7a8 (patch)
treed82e5fda75a9811bc2e280f3933cc36a99ff9e4b /core/js/js.js
parenta3800a6810fca68eff1789dc21488389bf22108a (diff)
downloadnextcloud-server-278c281cc9c03ad060ac6a91784058066411c7a8.tar.gz
nextcloud-server-278c281cc9c03ad060ac6a91784058066411c7a8.zip
Deprecate oc_current_user, fix usage and move currentUser to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/core/js/js.js b/core/js/js.js
index c4017b46267..55bc4ffb963 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1,4 +1,3 @@
-var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user');
var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');
/** @namespace OCP */
@@ -16,13 +15,6 @@ Object.assign(window.OC, {
*/
_capabilities: window.oc_capabilities || null,
- /**
- * Currently logged in user or null if none
- *
- * @type String
- * @deprecated use {@link OC.getCurrentUser} instead
- */
- currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false,
theme: window.oc_defaults || {},
requestToken: oc_requesttoken,
@@ -93,23 +85,6 @@ Object.assign(window.OC, {
},
/**
- * Returns the currently logged in user or null if there is no logged in
- * user (public page mode)
- *
- * @return {OC.CurrentUser} user spec
- * @since 9.0.0
- */
- getCurrentUser: function() {
- if (_.isUndefined(this._currentUserDisplayName)) {
- this._currentUserDisplayName = document.getElementsByTagName('head')[0].getAttribute('data-user-displayname');
- }
- return {
- uid: this.currentUser,
- displayName: this._currentUserDisplayName
- };
- },
-
- /**
* get the absolute path to an image file
* if no extension is given for the image, it will automatically decide
* between .png and .svg based on what the browser supports