From ee9598546638f26545533f06e564d077600b0682 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Mon, 9 Apr 2012 21:54:45 +0200 Subject: [PATCH] add errorType for passwort reset --- www/inc/wext/customer.php | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/www/inc/wext/customer.php b/www/inc/wext/customer.php index ca2b101..e961aa7 100644 --- a/www/inc/wext/customer.php +++ b/www/inc/wext/customer.php @@ -322,6 +322,7 @@ class WOCustomer extends WOCustomerAbstract if(!isset($HTTPARGS['customer']) || !isset($HTTPARGS['passcode'])){ $p=$twig->loadTemplate('reseterror.html'); $vars['errorText']=tr("There is a problem with your mail client or your browser: please copy the URL into the browser manually and try again."); + $vars['errorType']='url'; return $p->render($vars); } //get customer @@ -329,6 +330,7 @@ class WOCustomer extends WOCustomerAbstract if(count($cts)<1){ $p=$twig->loadTemplate('reseterror.html'); $vars['errorText']=tr("This user does not exist."); + $vars['errorType']='nonexist'; return $p->render($vars); } $ct=$cts[0]; @@ -337,6 +339,7 @@ class WOCustomer extends WOCustomerAbstract $ct->rstcode!=$HTTPARGS['passcode'] || $ct->rsttill < time()){ $p=$twig->loadTemplate('reseterror.html'); $vars['errorText']=tr("The passcode supplied by your browser is either invalid or expired."); + $vars['errorType']='invalid'; return $p->render($vars); } //check for change request @@ -346,6 +349,7 @@ class WOCustomer extends WOCustomerAbstract if($HTTPARGS[$p1] != $HTTPARGS[$p2] || $HTTPARGS[$p1] == ""){ $p=$twig->loadTemplate('reseterror.html'); $vars['errorText']=tr("The password does not match or is empty, please use the back button of your browser and try again."); + $vars['errorType']='mismatch'; return $p->render($vars); } //set password -- 1.7.2.5