diff options
Diffstat (limited to 'login.php')
| -rw-r--r-- | login.php | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_users/login.php,v 1.5 2006/02/06 00:12:08 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_users/login.php,v 1.6 2006/02/17 13:57:55 squareing Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,7 +8,7 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * - * $Id: login.php,v 1.5 2006/02/06 00:12:08 squareing Exp $ + * $Id: login.php,v 1.6 2006/02/17 13:57:55 squareing Exp $ * @package users * @subpackage functions */ @@ -18,6 +18,13 @@ */ include_once ("../bit_setup_inc.php"); +if( !empty( $_SERVER['HTTP_REFERER'] ) && !strpos( $_SERVER['HTTP_REFERER'], 'login.php' ) && !strpos( $_SERVER['HTTP_REFERER'], 'register.php' ) ) { + $from = parse_url( $_SERVER['HTTP_REFERER'] ); + if( $from['host'] == $_SERVER['SERVER_NAME'] ) { + $_SESSION['loginfrom'] = $from['path'].'?'.$from['query']; + } +} + if( $gBitUser->isRegistered() ) { header( 'Location: '.USERS_PKG_URL.'my.php' ); die; |
