Revision 1719
Added by Luisehahne about 13 years ago
| logout.php | ||
|---|---|---|
| 3 | 3 |
* |
| 4 | 4 |
* @category frontend |
| 5 | 5 |
* @package account |
| 6 |
* @author WebsiteBaker Project |
|
| 7 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
| 6 |
* @author Ryan Djurovich, WebsiteBaker Project |
|
| 7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
| 9 | 8 |
* @link http://www.websitebaker2.org/ |
| 10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
| 11 | 10 |
* @platform WebsiteBaker 2.8.x |
| ... | ... | |
| 22 | 21 |
setcookie('REMEMBER_KEY', '', time()-3600, '/');
|
| 23 | 22 |
} |
| 24 | 23 |
|
| 25 |
$redirect = ((isset($_SESSION['HTTP_REFERER']) && $_SESSION['HTTP_REFERER'] != '') ? $_SESSION['HTTP_REFERER'] : WB_URL.'/index.php'); |
|
| 24 |
$redirect = ((isset($_SESSION['HTTP_REFERER']) && $_SESSION['HTTP_REFERER'] != '' && basename($_SESSION['HTTP_REFERER']) != 'logout.php') ? $_SESSION['HTTP_REFERER'] : WB_URL.'/index.php');
|
|
| 26 | 25 |
|
| 27 | 26 |
$_SESSION['USER_ID'] = null; |
| 28 | 27 |
$_SESSION['GROUP_ID'] = null; |
| ... | ... | |
| 37 | 36 |
session_destroy(); |
| 38 | 37 |
|
| 39 | 38 |
if(INTRO_PAGE) {
|
| 40 |
header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
|
|
| 39 |
header('Location: '.WB_URL.'/index.php');
|
|
| 41 | 40 |
} else {
|
| 42 | 41 |
header('Location: '.$redirect);
|
| 43 | 42 |
} |
Also available in: Unified diff
! beginning update frontend account
! remove html markup from code