Elgg  Version 3.0
logout.php
Go to the documentation of this file.
1 <?php
6 if (!logout()) {
7  return elgg_error_response(elgg_echo('logouterror'));
8 }
9 
10 return elgg_ok_response('', elgg_echo('logoutok'), '');
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_error_response($error= '', $forward_url=REFERRER, $status_code=ELGG_HTTP_OK)
Prepare an error response to be returned by a page or an action handler.
elgg_ok_response($content= '', $message= '', $forward_url=null, $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
logout()
Log the current user out.
Definition: sessions.php:313