Revision 6062,
1.0 KB
checked in by niltonneto, 12 years ago
(diff) |
Ticket #2507 - Corrigido rotina que efetua logout do usuário.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[6019] | 1 | <?php |
---|
| 2 | class LogoutResource extends Expresso { |
---|
| 3 | |
---|
| 4 | public function post($request){ |
---|
| 5 | // to Receive POST Params (use $this->params) |
---|
| 6 | parent::post($request); |
---|
| 7 | |
---|
| 8 | if($this-> isLoggedIn()) |
---|
[6062] | 9 | { if ($_SESSION['phpgw_session']['session_id'] && file_exists($GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$_SESSION['phpgw_session']['session_id'])) |
---|
[6019] | 10 | { |
---|
| 11 | $dh = opendir($GLOBALS['phpgw_info']['server']['temp_dir']. SEP . $_SESSION['phpgw_session']['session_id']); |
---|
| 12 | while ($file = readdir($dh)) |
---|
| 13 | { |
---|
| 14 | if ($file != '.' && $file != '..') |
---|
| 15 | { |
---|
| 16 | unlink($GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$_SESSION['phpgw_session']['session_id'].SEP.$file); |
---|
| 17 | } |
---|
| 18 | } |
---|
| 19 | rmdir($GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$_SESSION['phpgw_session']['session_id']); |
---|
| 20 | } |
---|
| 21 | $GLOBALS['phpgw']->hooks->process('logout'); |
---|
| 22 | $GLOBALS['phpgw']->session->destroy($_SESSION['phpgw_session']['session_id'], $GLOBALS['kp3']); |
---|
| 23 | $this->setResult(true); |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | //to Send Response (JSON RPC format) |
---|
| 27 | return $this->getResponse(); |
---|
| 28 | } |
---|
| 29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.