#1072 - reset user details when the user is not logged in

This commit is contained in:
Vito Albano
2016-12-15 11:53:23 +00:00
parent 5baa124699
commit 5ee86c2cdb

View File

@@ -48,7 +48,6 @@ export class UserInfoComponent implements OnInit {
if (translate) { if (translate) {
translate.addTranslationFolder('ng2-alfresco-userinfo', 'node_modules/ng2-alfresco-userinfo/dist/src'); translate.addTranslationFolder('ng2-alfresco-userinfo', 'node_modules/ng2-alfresco-userinfo/dist/src');
} }
authService.loginSubject.subscribe((response) => { authService.loginSubject.subscribe((response) => {
this.getUserInfo(); this.getUserInfo();
}); });
@@ -75,6 +74,9 @@ export class UserInfoComponent implements OnInit {
this.ecmUserImage = this.ecmUserService.getUserProfileImage(this.ecmUser.avatarId); 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 = <BpmUserModel> res; this.bpmUser = <BpmUserModel> res;
}); });
this.bpmUserImage = this.bpmUserService.getCurrentUserProfileImage(); this.bpmUserImage = this.bpmUserService.getCurrentUserProfileImage();
} else {
this.bpmUser = null;
this.bpmUserImage = null;
} }
} }