X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=password_reset.php;h=e73dcf816621bec9235fab63433b5452b91e10f2;hb=ecf7d911c95935f8cfb2403f645cd12f93d8c3f5;hp=9c2ed4e9c89b18aad06f3b7cf7b9a95af0327418;hpb=9e82b53fc5d8cb1e54b5fde774fa68a916f28b4c;p=timetracker.git diff --git a/password_reset.php b/password_reset.php index 9c2ed4e9..e73dcf81 100644 --- a/password_reset.php +++ b/password_reset.php @@ -46,7 +46,7 @@ if ($request->isPost()) { // Validate user input. if (!ttValidString($cl_login)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.login')); - if ($err->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. @@ -61,7 +61,7 @@ if ($request->isPost()) { } } - if ($err->IsEmpty()) { + if ($err->no()) { $user = new ttUser($cl_login); // Note: reusing $user from initialize.php here. // Prepare and save a temporary reference for user. @@ -105,12 +105,12 @@ if ($request->isPost()) { else $pass_edit_url = $http.'://'.$_SERVER['HTTP_HOST'].'/password_change.php?ref='.$temp_ref; - $sender->setSendType(MAIL_MODE); - $res = $sender->send($cl_subject, sprintf($user_i18n->getKey('form.reset_password.email_body'), $pass_edit_url)); + $sender->setMailMode(MAIL_MODE); + $res = $sender->send($cl_subject, sprintf($user_i18n->getKey('form.reset_password.email_body'), $_SERVER['REMOTE_ADDR'], $pass_edit_url)); $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()"');