Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Security API > Methods

Security API: logout

Scroll Prev Next More

 

Logs the current user out without redirecting them.

Syntax

Security::logout()

Arguments

No arguments.

Return value

No return value.

Example 1

Log the current user out and redirect to another page from the server side event

 

Security::logout();
//**********  Redirect to another page  ************
header("Location: login.php");
exit();

Example 2

Logout from a Javascript event. The same idea but you can use this code in button's ClientBefore or ClientAfter event.

 

location.href='login.php?a=logout';
return false;

 

 

 

See also:

Security API: loginAs

Events: Redirect to another page

About Security API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software