MOBILE-4047 user: Get user basic info from siteInfo as fallback
parent
cbb1a1ecf5
commit
bf78ca0e8f
|
@ -71,7 +71,14 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
|
|||
|
||||
// Load the handlers.
|
||||
if (this.siteInfo) {
|
||||
try {
|
||||
this.user = await CoreUser.getProfile(this.siteInfo.userid);
|
||||
} catch {
|
||||
this.user = {
|
||||
id: this.siteInfo.userid,
|
||||
fullname: this.siteInfo.fullname,
|
||||
};
|
||||
}
|
||||
|
||||
this.subscription = CoreUserDelegate.getProfileHandlersFor(this.user, CoreUserDelegateContext.USER_MENU)
|
||||
.subscribe((handlers) => {
|
||||
|
|
Loading…
Reference in New Issue