1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 03:12:21 -05:00

added email to the required fields

This commit is contained in:
Thomas Citharel 2014-08-27 11:13:12 +02:00
parent f82cca2d5c
commit 68d0118a8c

View File

@ -131,6 +131,7 @@ else if (isset($_POST['install'])) {
// User informations
$username = trim($_POST['username']);
$password = trim($_POST['password']);
$email = trim($_POST['email']);
$salted_password = sha1($password . $username . $salt);
// Database informations
@ -194,8 +195,8 @@ else if (isset($_POST['install'])) {
// Create user
$handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = 'INSERT INTO users (username, password, name) VALUES (?, ?, ?)';
$params = array($username, $salted_password, $username);
$sql = 'INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, ?)';
$params = array($username, $salted_password, $username, $email);
$query = executeQuery($handle, $sql, $params);
$id_user = $handle->lastInsertId();
@ -506,6 +507,10 @@ php composer.phar install</code></pre><p>Then, please reload the page.</p></li>
<p>
<label for="show">Show password:</label> <input name="show" id="show" type="checkbox" onchange="document.getElementById('password').type = this.checked ? 'text' : 'password'">
</p>
<p>
<label for="email">Email (not required)</label>
<input type="email" name="email" />
</p>
</fieldset>
<input type="submit" id="install_button" value="Install wallabag" name="install" />