_rootDir . "languages/" . $settings->_language . "/lang.inc"; function _printMessage($heading, $message) { UI::htmlStartPage($heading, "password"); UI::globalBanner(); UI::pageNavigation($heading); UI::contentContainer($message."
\n"); UI::htmlEndPage(); return; } if (isset($_POST["email"])) { $email = $_POST["email"]; } if (isset($_POST["login"])) { $login = $_POST["login"]; } if (empty($email) || empty($login)) { UI::exitError(getMLText("password_forgotten"),getMLText("no_email_or_login")); } $user = $dms->getUserByLogin($login, $email); if($user) { if($hash = $dms->createPasswordRequest($user)) { $emailobj = new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword); $subject = "password_forgotten_email_subject"; $message = "password_forgotten_email_body"; $params = array(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $params['hash'] = $hash; $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ChangePassword.php?hash=".$hash; $params['url_prefix'] = getBaseUrl().$settings->_httpRoot; $emailobj->toIndividual($settings->_smtpSendFrom, $user, $subject, $message, $params); } } header('Location: ../out/out.PasswordSend.php'); exit; ?>