diff options
| author | Jams H Thompson <jht001@users.sourceforge.net> | 2006-08-17 06:28:44 +0000 |
|---|---|---|
| committer | Jams H Thompson <jht001@users.sourceforge.net> | 2006-08-17 06:28:44 +0000 |
| commit | a8d4c166109e211c9b1d3b277ddfc0108d466f63 (patch) | |
| tree | 8a5c3cbc3c1a2193950c469a54255d800a5fbc21 /change_password.php | |
| parent | 964e15325884ed7b3d9ff9217a9c11a36c017200 (diff) | |
| download | users-a8d4c166109e211c9b1d3b277ddfc0108d466f63.tar.gz users-a8d4c166109e211c9b1d3b277ddfc0108d466f63.tar.bz2 users-a8d4c166109e211c9b1d3b277ddfc0108d466f63.zip | |
Fix several user registration issues
Diffstat (limited to 'change_password.php')
| -rw-r--r-- | change_password.php | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/change_password.php b/change_password.php index f3a7401..b3dea8a 100644 --- a/change_password.php +++ b/change_password.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_users/change_password.php,v 1.4 2006/04/19 17:11:19 spiderr Exp $ + * $Header: /cvsroot/bitweaver/_bit_users/change_password.php,v 1.5 2006/08/17 06:28:44 jht001 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: change_password.php,v 1.4 2006/04/19 17:11:19 spiderr Exp $ + * $Id: change_password.php,v 1.5 2006/08/17 06:28:44 jht001 Exp $ * @package users * @subpackage functions */ @@ -35,18 +35,12 @@ if (isset($_REQUEST["change"])) { $gBitSystem->fatalError( tra("Invalid old password") ); } //Validate password here - if (strlen($_REQUEST["pass"]) < $users_min_pass_length) { - $gBitSystem->fatalError( tra("Password should be at least"). ' ' . $users_min_pass_length . ' ' . tra("characters long") ); - } - // Check this code - if ($users_pass_chr_num == 'y') { - if (!preg_match_all("/[0-9]+/", $_REQUEST["pass"], $foo) || !preg_match_all("/[A-Za-z]+/", $_REQUEST["pass"], $foo)) { - $gBitSmarty->assign('msg', tra("Password must contain both letters and numbers")); - $gBitSystem->display( 'error.tpl' ); - die; + $passsword_error_msg = $gBitUser->verifyPasswordFormat( $_REQUEST["pass"] ); + if (strlen($passsword_error_msg)) { + $gBitSystem->fatalError( $passsword_error_msg ); } - } - $gBitUser->change_user_password($_REQUEST['login'], $_REQUEST["pass"]); + + $gBitUser->storePassword( $_REQUEST["pass"], $_REQUEST['login'] ); $url = $gBitUser->login( $_REQUEST['login'], $_REQUEST["pass"] ); header ( "location: ".$url ); } |
