X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=password_reset.php;h=216a81cf4b33619ab4c207608197f118e2ede09d;hb=da25ca5669ac88985d37a68392ed736ac03dcc3c;hp=d67372c524f22186a1c4b869beea92e473877ce8;hpb=a7ba11adfecf6cb906749efe5abce688363aef07;p=timetracker.git diff --git a/password_reset.php b/password_reset.php index d67372c5..216a81cf 100644 --- a/password_reset.php +++ b/password_reset.php @@ -44,9 +44,9 @@ if ($request->isPost()) { $cl_login = $request->getParameter('login'); // Validate user input. - if (!ttValidString($cl_login)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.login')); + if (!ttValidString($cl_login)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.login')); - if ($errors->IsEmpty()) { + if ($err->no()) { if (!ttUserHelper::getUserByLogin($cl_login)) { // User with a specified login was not found. // In this case, if login looks like email, try finding user by email. @@ -55,13 +55,13 @@ if ($request->isPost()) { if ($login) $cl_login = $login; else - $errors->add($i18n->getKey('error.no_login')); + $err->add($i18n->getKey('error.no_login')); } else - $errors->add($i18n->getKey('error.no_login')); + $err->add($i18n->getKey('error.no_login')); } } - if ($errors->IsEmpty()) { + if ($err->no()) { $user = new ttUser($cl_login); // Note: reusing $user from initialize.php here. // Prepare and save a temporary reference for user. @@ -83,7 +83,7 @@ if ($request->isPost()) { if (ttValidEmail($cl_login)) $receiver = $cl_login; else - $errors->add($i18n->getKey('error.no_email')); + $err->add($i18n->getKey('error.no_email')); } if ($receiver) { @@ -110,7 +110,7 @@ if ($request->isPost()) { $smarty->assign('result_message', $res ? $i18n->getKey('form.reset_password.message') : $i18n->getKey('error.mail_send')); } } -} // POST +} // isPost $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.resetPasswordForm.login.focus()"');