$.udb.logout()
note
This article is about the logout() function of the udb object.
$.udb.logout()
Logs out.
Returns a Promise object or the 'this' object. From USoft 10.0.1I, returns a udbPromise instead of a Promise object.
Syntax
.logout( *options* )
*options* ::= {
page: *page*,
promise: *promise*,
success: *success-function*
}
*promise* ::= { true | false }
Options is a struct that can have the following items, all of which are optional.
Page is a string that defines the page to jump to or a function to call on success.
*Promise *determines the return value of this function. If promise has the value 'true' (the default), a Promise object is returned. If promise has the value 'false', the ‘this’ object is returned instead.
Success-function is a function called after the operation has successfully completed. This function is executed on the next page, if such a page is specified.
Examples
$.udb.logout();
$.udb.logout({page:'MyGoodbyePage'});
$.udb.logout()
.then(function(){
alert('Goodbye!');
});
Related events
Event | Applies to | Occurs when |
---|---|---|
logout | Page objects | After each logout action |
timeout | <body> DOM element | User is idle for a longer period than the time-out period |