mirror of
https://github.com/pikami/palm-paste.git
synced 2026-10-21 00:24:48 +01:00
Users now have their own profile pages
This commit is contained in:
1 parent
8690bd730c
commit
713198629c
5 files changed
+105
-21
No files matched your search
@@ -42,4 +42,18 @@ function GetUserByID($id){
|
||||
return array(-1,-1,-1,-1);
|
||||
}
|
||||
}
|
||||
function GetUserIDByName($name){
|
||||
include_once "config/config.php";
|
||||
$conn = GetConnectionToDB();
|
||||
$stmt = $conn->prepare("SELECT * FROM users WHERE user=:name");
|
||||
$stmt->bindParam(':name', $name);
|
||||
$stmt->execute();
|
||||
if($result = $stmt->fetch()){
|
||||
$conn = null;
|
||||
return $result[0];
|
||||
} else {
|
||||
$conn = null;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user