From 5ee86c2cdb3844e8d6a5d31dc42317ec2596f3cd Mon Sep 17 00:00:00 2001 From: Vito Albano Date: Thu, 15 Dec 2016 11:53:23 +0000 Subject: [PATCH] #1072 - reset user details when the user is not logged in --- .../src/components/user-info.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts b/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts index 801b2230b8..916e844dc5 100644 --- a/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts +++ b/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts @@ -48,7 +48,6 @@ export class UserInfoComponent implements OnInit { if (translate) { translate.addTranslationFolder('ng2-alfresco-userinfo', 'node_modules/ng2-alfresco-userinfo/dist/src'); } - authService.loginSubject.subscribe((response) => { this.getUserInfo(); }); @@ -75,6 +74,9 @@ export class UserInfoComponent implements OnInit { this.ecmUserImage = this.ecmUserService.getUserProfileImage(this.ecmUser.avatarId); } ); + } else { + this.ecmUser = null; + this.ecmUserImage = null; } } @@ -85,6 +87,9 @@ export class UserInfoComponent implements OnInit { this.bpmUser = res; }); this.bpmUserImage = this.bpmUserService.getCurrentUserProfileImage(); + } else { + this.bpmUser = null; + this.bpmUserImage = null; } }