Commit | Line | Data |
---|---|---|
e586807d H |
1 | <?php |
2 | /* This program is free software. It comes without any warranty, to | |
3 | * the extent permitted by applicable law. You can redistribute it | |
4 | * and/or modify it under the terms of the Do What The Fuck You Want | |
5 | * To Public License, Version 2, as published by Sam Hocevar. See | |
6 | * http://sam.zoy.org/wtfpl/COPYING for more details. */ | |
7 | ||
8 | ||
9 | function logout() { | |
10 | global $db; | |
11 | $q="update users set user_action_id=null where user_id='".$_SESSION['user_id']."'"; | |
12 | $db->query($q); | |
13 | log::log('logout',$node['node_id'],'ok',$_SESSION['user_name']); | |
14 | session_unset(); | |
15 | Header("Location: /main"); | |
16 | } | |
17 | ||
18 | ?> |