} else { $user = new tlUser($userID); $result = $user->resetPassword($db); $gui->note = $result['msg']; if ($result['status'] >= tl::OK) { if ($user->readFromDB($db) >= tl::OK) { logAuditEvent(TLS("audit_pwd_reset_requested", $user->login), "PWD_RESET", $userID, "users"); } redirect(TL_BASE_HREF . "login.php?note=lost"); exit; } else { if ($result['status'] == tlUser::E_EMAILLENGTH) { $gui->note = lang_get('mail_empty_address'); } else { if ($note != "") { $gui->note = tlUser::getUserErrorMessage($result['status']); } } } } } $smarty = new TLSmarty(); $smarty->assign('gui', $gui); $smarty->display($templateCfg->default_template); function init_args() { $iParams = array("login" => array(tlInputParameter::STRING_N, 0, 30)); $args = new stdClass(); P_PARAMS($iParams, $args); return $args; }