added a redirect when logging in working, removed the useless args for $user->getPassword() in login, and fixed the user class
This commit is contained in:
parent
3c26911da3
commit
5a83ee91db
|
|
@ -17,7 +17,7 @@ class User {
|
|||
|
||||
public function getMoney($short) {
|
||||
if ($short == "true") {
|
||||
$money = $this->$query->sqlData["money"];
|
||||
$money = $this->sqlData["money"];
|
||||
|
||||
if ($money < 1000000) {
|
||||
// Anything less than a million
|
||||
|
|
@ -31,7 +31,7 @@ class User {
|
|||
|
||||
}
|
||||
} else {
|
||||
return $this->$query->sqlData["money"];
|
||||
return $this->sqlData["money"];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,9 @@ if(isset($_POST['submit'])) {
|
|||
$query->execute();
|
||||
$result = $query->fetchColumn();
|
||||
if ($result > 0) {
|
||||
if (password_verify($password, $user->getPassword($con, $username))) {
|
||||
if (password_verify($password, $user->getPassword())) {
|
||||
$_SESSION["user"] = $user->getID($con, $username);
|
||||
header('location: /home');
|
||||
//echo $_SESSION["user"];
|
||||
} else {
|
||||
$passwordiswrong = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue