From b16d26e73515afa677687f555375e4a6ae012274 Mon Sep 17 00:00:00 2001 From: wjames5 Date: Mon, 1 Feb 2010 16:49:13 +0000 Subject: pw errors is now an array, handle it; add error feed back for pw match to reg form --- BitUser.php | 12 ++++++------ index.php | 6 ++++-- templates/register.tpl | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/BitUser.php b/BitUser.php index 02f596f..4767f36 100644 --- a/BitUser.php +++ b/BitUser.php @@ -1,6 +1,6 @@ - * @version $Revision: 1.242 $ + * @version $Revision: 1.243 $ * @package users * @subpackage BitUser */ @@ -293,10 +293,10 @@ class BitUser extends LibertyMime { $passwordErrors['password2'] = tra("The passwords didn't match"); } if (!$this->isValid() || isset($pParamHash['password']) ) { - $passswordError = $this->verifyPasswordFormat( $pParamHash['password'] ); + $passwordErrors['password'] = $this->verifyPasswordFormat( $pParamHash['password'] ); } - if( !empty( $passswordError ) ) { - $this->mErrors['password'] = $passswordError; + if( !empty( $passwordErrors ) ) { + $this->mErrors = array_merge( $this->mErrors,$passwordErrors ); } else { // Generate a unique hash //$pParamHash['user_store']['hash'] = md5( strtolower( (!empty($pParamHash['login'])?$pParamHash['login']:'') ).$pPassword.$pParamHash['email'] ); diff --git a/index.php b/index.php index c86fa39..672318f 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,8 @@ isValid() && (( $gBitUser->hasPe // end of content listing } + $gQueryUser->invokeServices( 'content_display_function' ); + // need to load layout now that we can check for center pieces $layoutHash['layout'] = $gQueryUser->getField( 'login' ); $layoutHash['fallback'] = TRUE; diff --git a/templates/register.tpl b/templates/register.tpl index e61bc4b..dd8ab39 100644 --- a/templates/register.tpl +++ b/templates/register.tpl @@ -85,6 +85,7 @@
+ {formfeedback error=$errors.password2} {formlabel label="Repeat password" for="password2"} {forminput} {required} -- cgit v1.3