Merge pull request #5008 from GabrielInTheWorld/fixUserNoAnonymous
Fixes showing guest, if user is not yet loaded
This commit is contained in:
commit
0ef02c6e87
@ -106,8 +106,13 @@ export class SiteComponent extends BaseComponent implements OnInit {
|
||||
overlayService.setSpinner(true, translate.instant('Loading data. Please wait...'));
|
||||
|
||||
this.operator.getViewUserObservable().subscribe(user => {
|
||||
this.username = user ? user.short_name : translate.instant('Guest');
|
||||
this.isLoggedIn = !!user;
|
||||
if (!operator.isAnonymous) {
|
||||
this.username = user ? user.short_name : '';
|
||||
this.isLoggedIn = true;
|
||||
} else {
|
||||
this.username = translate.instant('Guest');
|
||||
this.isLoggedIn = false;
|
||||
}
|
||||
});
|
||||
|
||||
offlineService.isOffline().subscribe(offline => {
|
||||
|
Loading…
Reference in New Issue
Block a user