Question

Logging out a user

Hey Community,
I'm trying to log out a user through JS.Is there way to do it ?
I'm aware that the db of the usersession can be updated, but it does bring a popup to the screen.Is there a workaround?
eg :
if ( some condition)
{  some custom function

}
else 

{  log the user out.

}
I did it check out this article, but unsure as to how to implement it 
https://community.creatio.com/questions/how-logout-user-after-checking-…

Like 0

Like

1 comments

Hi,

 

Yes, you can call

 

Terrasoft.MainMenuUtilities.logout();

 

to logout the user. You can even test it in the developer console in the browser (just execute this line in the console).

 

As for how to use it - depends on your business task. You can call this logout method as a button click handler or using any other conditions suitable.

Show all comments