Update user.php
This commit is contained in:
parent
55e67129d7
commit
2aa58cc97a
|
|
@ -15,13 +15,13 @@ class User {
|
|||
public function isLoggedIn() {
|
||||
if(isset($_SESSION["user"])) {
|
||||
$q = $this->con->prepare("SELECT * FROM users WHERE id = :id");
|
||||
$q->bindParam(':id',$this->sqlData["id"],PDO::PARAM_INT);
|
||||
$q->bindParam(':id',$_SESSION["user"],PDO::PARAM_INT);
|
||||
$q->execute();
|
||||
$usr = $q->fetch();
|
||||
if($usr) {
|
||||
return true;
|
||||
} else {
|
||||
if(!$usr) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue