diff --git a/dmp-frontend/src/app/ui/navbar/navbar.component.html b/dmp-frontend/src/app/ui/navbar/navbar.component.html
index 36c7f03d2..24ae834b7 100644
--- a/dmp-frontend/src/app/ui/navbar/navbar.component.html
+++ b/dmp-frontend/src/app/ui/navbar/navbar.component.html
@@ -57,7 +57,7 @@
-
-
+
diff --git a/dmp-frontend/src/app/ui/navbar/navbar.component.ts b/dmp-frontend/src/app/ui/navbar/navbar.component.ts
index b1eb2cf42..7f34dd67d 100644
--- a/dmp-frontend/src/app/ui/navbar/navbar.component.ts
+++ b/dmp-frontend/src/app/ui/navbar/navbar.component.ts
@@ -26,6 +26,7 @@ import { nameof } from 'ts-simple-nameof';
import { StartNewDmpDialogComponent } from '../dmp/new/start-new-dmp-dialogue/start-new-dmp-dialog.component';
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
import { UserDialogComponent } from './user-dialog/user-dialog.component';
+import { UserService } from '@app/core/services/user/user.service';
@Component({
selector: 'app-navbar',
@@ -33,6 +34,7 @@ import { UserDialogComponent } from './user-dialog/user-dialog.component';
styleUrls: ['./navbar.component.css', './navbar.component.scss']
})
export class NavbarComponent extends BaseComponent implements OnInit {
+ userName: string = '';
progressIndication = false;
//private listTitles: any[];
location: Location;
@@ -53,6 +55,7 @@ export class NavbarComponent extends BaseComponent implements OnInit {
private element: ElementRef,
private router: Router,
public authentication: AuthService,
+ private userService: UserService,
private dialog: MatDialog,
private progressIndicationService: ProgressIndicationService,
private languageService: LanguageService,
@@ -105,6 +108,11 @@ export class NavbarComponent extends BaseComponent implements OnInit {
}
});
this.loadLogo();
+
+ this.userService.getSingle(this.authentication.userId(), [
+ nameof(x => x.id),
+ nameof(x => x.name)
+ ]).subscribe(u => this.userName = u.name);
}
private loadLogo() {