Elgg  Version 6.1
logout.php
Go to the documentation of this file.
1 <?php
6 if (!elgg_logout()) {
7  return elgg_error_response(elgg_echo('logouterror'));
8 }
9 
10 return elgg_ok_response('', elgg_echo('logoutok'), '');
elgg_ok_response($content= '', string|array $message= '', string $forward_url=null, int $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_logout()
Log the current user out.
Definition: sessions.php:91
elgg_error_response(string|array $message= '', string $forward_url=REFERRER, int $status_code=ELGG_HTTP_BAD_REQUEST)
Prepare an error response to be returned by a page or an action handler.