[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:
parent
955464fdca
commit
b2f9bf7cad
|
@ -65,7 +65,9 @@ export class UserComponent {
|
|||
|
||||
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
if(this.sub) {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
if (this.sublogin) {
|
||||
this.sublogin.unsubscribe();
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue