[Library |Trunk]

use component: Add check for unsubscribe 
Session: when remove  user, remove User cookie again
	


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57587 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-11-12 12:56:43 +00:00
parent 955464fdca
commit b2f9bf7cad
2 changed files with 5 additions and 3 deletions

View File

@ -65,7 +65,9 @@ export class UserComponent {
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub) {
this.sub.unsubscribe();
}
if (this.sublogin) {
this.sublogin.unsubscribe();
}

View File

@ -14,9 +14,9 @@ export class User {
export class Session{
public static removeUser() {
COOKIE.deleteCookie(COOKIE.cookieName_id)
COOKIE.deleteCookie(COOKIE.cookieName_id);
COOKIE.deleteCookie("openAIRESession");
COOKIE.deleteCookie("openAIREUser");
}
public static isLoggedIn(): boolean {