forked from EVOgeek/Vmeda.Online
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.
|
// Load the handlers.
|
||||||
if (this.siteInfo) {
|
if (this.siteInfo) {
|
||||||
this.user = await CoreUser.getProfile(this.siteInfo.userid);
|
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)
|
this.subscription = CoreUserDelegate.getProfileHandlersFor(this.user, CoreUserDelegateContext.USER_MENU)
|
||||||
.subscribe((handlers) => {
|
.subscribe((handlers) => {
|
||||||
|
|
Loading…
Reference in New Issue