summaryrefslogtreecommitdiff
path: root/actions/logout.php
blob: a40400e7ee614ded9703722928bc792146516f8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

class LogoutAction extends Action {
	function handle($args) {
		parent::handle($args);
		if (!common_logged_in()) {
			common_user_error(_t('Not logged in.'));
		} else {
			common_set_user(NULL);
			common_redirect(common_local_url('main'));
		}
	}
}