Skip to content

Commit

Permalink
fix: right after loading windows.oc_user is stored in OC._user
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Oct 20, 2023
1 parent 3c7b725 commit 9322efc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/js/js.js
Expand Up @@ -74,6 +74,8 @@ var OC = {
*/
_capabilities: window.oc_capabilities || null,

_user: window.oc_user || null,

appswebroots: (typeof oc_appswebroots !== 'undefined') ? oc_appswebroots : false,
/**
* Currently logged in user or null if none
Expand Down Expand Up @@ -321,7 +323,7 @@ var OC = {
* @since 9.0.0
*/
getCurrentUser: function () {
if (!_.isUndefined(window.oc_user)) {
if (OC._user !== null) {
return oc_user;
}
return {
Expand Down

0 comments on commit 9322efc

Please sign in to comment.