diff --git a/admin/configuration.php b/admin/configuration.php index a71aad5..91a922f 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -49,19 +49,6 @@ if ($row = $result->fetch()) { $recaptcha_secretkey = $row['recaptcha_secretkey']; } -$result = $conn->query("SELECT * FROM mail WHERE id='1'"); - -if ($row = $result->fetch()) { - $verification = Trim($row['verification']); - $smtp_host = Trim($row['smtp_host']); - $smtp_username = Trim($row['smtp_username']); - $smtp_password = Trim($row['smtp_password']); - $smtp_port = Trim($row['smtp_port']); - $protocol = Trim($row['protocol']); - $auth = Trim($row['auth']); - $socket = Trim($row['socket']); -} - /* Update the configuration if necessary */ if ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -99,29 +86,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $msg = '
Site permissions saved.
'; - } elseif ($action === 'mail') { - $new_mail = [ - 'verification' => trim($_POST['verification']), - 'smtp_host' => trim($_POST['smtp_host']), - 'smtp_port' => trim($_POST['smtp_port']), - 'smtp_user' => trim($_POST['smtp_user']), - 'socket' => trim($_POST['socket']), - 'auth' => trim($_POST['auth']), - 'protocol' => trim($_POST['protocol']) - ]; - - $current_config['mail'] = $new_mail; - $current_mail = $new_mail; - - updateConfiguration(CONFIG_FILE_PATH, $current_config); - - $msg = ' -
- Mail settings updated -
'; - } - - if (isset($_POST['cap'])) { + } else if (isset($_POST['cap'])) { $query = $conn->prepare( 'UPDATE captcha SET cap_e = ?, mode = ?, mul = ?, allowed = ?, color = ?, recaptcha_sitekey = ?, recaptcha_secretkey = ? WHERE id = 1' ); @@ -199,8 +164,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { data-toggle="tab">Permissions
  • Captcha Settings
  • -
  • Mail Settings
  • diff --git a/login.php b/login.php index 2458430..395b678 100644 --- a/login.php +++ b/login.php @@ -98,13 +98,9 @@ if (isset($_POST['signup'])) { $error = $lang['userexists']; // "Username already taken."; } else { $query = $conn->prepare( - "INSERT INTO users (oauth_uid, username, email_id, platform, password, verified, picture, date, ip, badge) VALUES ('0', ?, ?, 'Direct', ?, ?, 'NONE', ?, ?, '0')" + "INSERT INTO users (username, password, picture, date, ip, badge) VALUES (?, ?, 'NONE', ?, ?, '0')" ); - $query->execute([$username, $email, $password, $verification_needed ? 0 : 1, $date, $ip]); - - if ($verification_needed) { - sendVerificationEmail($email, $username, $username);; - } + $query->execute([$username, $password, $date, $ip]); $success = $lang['registered']; // "Your account was successfully registered."; } diff --git a/theme/bulma/login.php b/theme/bulma/login.php index e368284..3994cd4 100644 --- a/theme/bulma/login.php +++ b/theme/bulma/login.php @@ -24,10 +24,6 @@ // Logged in if (isset($success)) { echo '

    ' . $success . '

    '; - // Verification email sent - if (isset($_GET['register']) && $verification == 'enabled') { - echo '

    ' . $lang['versent'] . '

    '; - } } // Errors elseif (isset($error)) { echo '

    ' . $error . '

    ';