mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-13 00:26:55 -05:00
Fix bug with registration
This commit is contained in:
parent
cd19d485c4
commit
58e1a9c8c9
@ -16,7 +16,7 @@ function register($user, $pass, $code)
|
||||
$q = $db->prepare("SELECT user FROM accounts WHERE user = (:user)");
|
||||
$q->bindParam(':user', $user);
|
||||
$q->execute();
|
||||
if ($q->fetchColumn() == 0) {
|
||||
if (!($result = $q->fetch())) {
|
||||
// Add new account
|
||||
$q = $db->prepare("INSERT INTO accounts (user, pass, level, apikey) VALUES (:user, :pass, :level, :apikey)");
|
||||
$q->bindParam(':user', $user);
|
||||
|
@ -11,7 +11,6 @@
|
||||
<form action="/includes/api.php?do=register" method="post">
|
||||
<input type="text" name="user" placeholder="Username" required>
|
||||
<input type="password" name="pass" placeholder="Password" required>
|
||||
<input type="password" name="confirmpass" placeholder="Confirm Password" required>
|
||||
<input type="text" name="code" placeholder="Invite Code" required>
|
||||
<input type="submit" value="Register">
|
||||
<footer class="clearfix">
|
||||
|
Loading…
Reference in New Issue
Block a user