diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-08-01 18:42:03 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-08-01 18:42:03 +0000 |
| commit | bd974e32890c11bad1e3b70f936d3026ef59edbf (patch) | |
| tree | 0dfbb789db4f0a832cdddc8fac72027bba4c6fca /validate.php | |
| parent | b5bf27ddc4ddac64a14fa82c2262acb10b5335cf (diff) | |
| download | users-bd974e32890c11bad1e3b70f936d3026ef59edbf.tar.gz users-bd974e32890c11bad1e3b70f936d3026ef59edbf.tar.bz2 users-bd974e32890c11bad1e3b70f936d3026ef59edbf.zip | |
merge recent changes with HEAD - R1 and HEAD are identical now
Diffstat (limited to 'validate.php')
| -rw-r--r-- | validate.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/validate.php b/validate.php index 9604d62..ad97777 100644 --- a/validate.php +++ b/validate.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_users/validate.php,v 1.3 2005/07/17 17:36:44 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_users/validate.php,v 1.4 2005/08/01 18:42:02 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: validate.php,v 1.3 2005/07/17 17:36:44 squareing Exp $ + * $Id: validate.php,v 1.4 2005/08/01 18:42:02 squareing Exp $ * @package users * @subpackage functions */ @@ -31,7 +31,7 @@ if ($gBitUser->hasPermission( 'bit_p_admin' )) { if (isset($_REQUEST["su"])) { if ($gBitUser->userExists( array( 'login' => $_REQUEST['username'] ) ) ) { $_SESSION["$user_cookie_site"] = $_REQUEST["username"]; - $smarty->assign_by_ref('user', $_REQUEST["username"]); + $gBitSmarty->assign_by_ref('user', $_REQUEST["username"]); } $url = $_SESSION['loginfrom']; //unset session variable for the next su @@ -61,8 +61,8 @@ $response = isset($_REQUEST['response']) ? $_REQUEST['response'] : false; // if $referer is set, login() will return the user to whence he came $url = $gBitUser->login( $user, $pass, $challenge, $response ); -// but if we came from a login page, let's go home -if( strpos( $url, 'login.php?' ) || strpos( $url, 'remind_password.php' ) ) { +// but if we came from a login page, let's go home (except if we got an error when login in) +if( (strpos( $url, 'login.php?' ) || strpos( $url, 'remind_password.php' )) && strpos( $url, 'login.php?error=') == -1) { $url = $gBitSystem->getDefaultPage(); } header('location: ' . $url); |
