This command/function immediately logs the user out and strips away their id, member, and groups vars.
It requires no special parameters. Here's how it looks as a form:
You can also do it as a function. Suppose you put the following on an action page and generated a link to it:
You click the link, the action is called logging the user out, the page refreshes, and they are back on the original page reloaded for them as a logged out user. One click instant logout!
The logout function can take a nextpage parameter to forward them to another page on logout if desired.