function password_reset() { if ($_SERVER['REQUEST_METHOD'] == 'POST') { global $__FROG_CONN__; $email = mysql_escape_string($_POST['email']); $registration_settings = "SELECT * FROM " . TABLE_PREFIX . "registered_users_settings WHERE id='1'"; foreach ($__FROG_CONN__->query($registration_settings) as $row) { $reset_no_email = $row['reset_no_email']; } if (empty($_POST['email'])) { echo $reset_no_email; } else { $common = new RUCommon(); $common->resetpassword($email); } } else { global $__FROG_CONN__; $registration_settings = "SELECT * FROM " . TABLE_PREFIX . "registered_users_settings WHERE id='1'"; foreach ($__FROG_CONN__->query($registration_settings) as $row) { $reset_form = $row['reset_form']; $reset_page = $row['reset_page']; $reset_text = $row['reset_text']; } echo $reset_text; echo '<form action="' . URL_PUBLIC . '' . $reset_page . '' . URL_SUFFIX . '" method="post">'; echo $reset_form; echo '</form>'; } }
function password_reset() { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $email = trim($_POST['email']); $reset_no_email = Plugin::getSetting('reset_no_email', "registered_users"); if (empty($_POST['email'])) { echo $reset_no_email; } else { $common = new RUCommon(); $common->resetpassword($email); } } else { $reset_form = new View('../../plugins/registered_users/views/reset'); $reset_page = Plugin::getSetting('reset_page', "registered_users"); $reset_text = Plugin::getSetting('reset_text', "registered_users"); echo $reset_text; echo '<form action="' . URL_PUBLIC . '' . $reset_page . '' . URL_SUFFIX . '" method="post">'; echo $reset_form; echo '</form>'; } }