From 278c281cc9c03ad060ac6a91784058066411c7a8 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 7 May 2019 20:29:51 +0200 Subject: Deprecate oc_current_user, fix usage and move currentUser to the bundle Signed-off-by: Christoph Wurst --- core/js/js.js | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'core/js/js.js') 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, @@ -92,23 +84,6 @@ Object.assign(window.OC, { return OC._capabilities; }, - /** - * 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 -- cgit v1.2.3