aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-05-08 15:57:09 +0200
committerGitHub <noreply@github.com>2019-05-08 15:57:09 +0200
commit10d5af18b3b1d632ec6446782f0f9121d3352dc4 (patch)
treeedcdfb9f896ed3e277231a3a14ceb4efcf194e2d /core/js/js.js
parenta2ad5d021f0d31babe8271748c77561a2c1addb7 (diff)
parent278c281cc9c03ad060ac6a91784058066411c7a8 (diff)
downloadnextcloud-server-10d5af18b3b1d632ec6446782f0f9121d3352dc4.tar.gz
nextcloud-server-10d5af18b3b1d632ec6446782f0f9121d3352dc4.zip
Merge pull request #15427 from nextcloud/refactor/oc-current-user-deprecate-bundle
Deprecate oc_current_user, fix usage and move currentUser to the bundle
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