File: logout.php

package info (click to toggle)
phpldapadmin 1.2.6.7-3~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 5,432 kB
  • sloc: php: 17,675; javascript: 5,299; xml: 1,498; sh: 379; python: 148; makefile: 23
file content (29 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
 * Log the user out of the application.
 *
 * @package phpLDAPadmin
 * @subpackage Page
 */

/**
 */

require './common.php';

if ($app['server']->logout()) {
	unset($_SESSION['ACTIVITY'][$app['server']->getIndex()]);

	system_message(array(
		'title'=>_('Logout from Server'),
		'body'=>_('Successfully logged out of server.'),
		'type'=>'info'),
		sprintf('index.php?server_id=%s',$app['server']->getIndex()));

} else
	system_message(array(
		'title'=>_('Failed to Logout of server'),
		'body'=>_('Please report this error to the admins.'),
		'type'=>'error'),
		sprintf('index.php?server_id=%s',$app['server']->getIndex()));
?>