defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); $task = mosGetParam($_REQUEST, 'task', ""); require_once $mainframe->getPath('front_html'); switch ($task) { case "lostPassword": lostPassForm($option); break; case "sendNewPass": sendNewPass($option); break; case "register": case "reviseRegistration": registerForm($option, $mosConfig_useractivation); break; case "confirmRegistration": confirmRegistration($option); break; case "saveRegistration": saveRegistration($option); break; case "activate": activate($option); break; } function lostPassForm($option) { global $mainframe; $mainframe->SetPageTitle(T_('Lost your Password?')); HTML_registration::lostPassForm($option); } function sendNewPass($option)
* the new account. */ if (isset($_POST['subjoin'])) { if (checkSubmitValues()) { /* Add the new account to the database */ $_SESSION['username'] = $_POST['user']; $_SESSION['password'] = md5($_POST['pass']); $_SESSION['reguid'] = addNewUser(trim($_POST['user']), trim($_POST['pass']), trim($_POST['email'])); $_SESSION['registered'] = true; header('Location: ' . $CFG->wwwroot . '/modules/frontpage/frontpage.php'); return; } // Otherwise will fall through to show the form, with the error set. } else { if (isset($_GET['confirm'])) { if (confirmRegistration($_GET['confirm'])) { $t->assign('message', 'Thank you for confirming your registration.'); $t->display('registerConfirm.tpl'); die; } else { $t->assign('message', 'This registration is no longer valid. Please begin your registration again.'); $t->display('registerConfirm.tpl'); die; } } else { if (isset($_SESSION['registered'])) { /** * This is the page that will be displayed after the * registration has been attempted. * This isn't being used at the moment. Rather user is just redirected. */