add authentication

This commit is contained in:
Hendrik
2017-01-26 13:29:56 +01:00
parent b89a575039
commit 1a53d01747
3 changed files with 24 additions and 0 deletions

View File

@@ -370,3 +370,18 @@ function countSomeUsers($search) {
$q->execute();
return $q;
}
function getRoleByID($userID) {
$stmt = $GLOBALS['db']->prepare("
SELECT
`role`
FROM
`user`
WHERE
`userID` = :userID
");
$stmt->bindParam(':userID', $userID);
$stmt->execute();
return $stmt;
}