Merge branch 'lars' into 'master'

Lars

See merge request !159
This commit was merged in pull request #163.
This commit is contained in:
Lars van Hijfte
2017-01-31 16:03:05 +01:00
25 changed files with 145 additions and 64 deletions

View File

@@ -2,6 +2,19 @@
require_once ("connect.php");
function updateLastActivity() {
$stmt = prepareQuery("
UPDATE
`user`
SET
`lastactivity` = NOW()
WHERE
`userID` = :userID
");
$stmt->bindParam(":userID", $_SESSION["userID"]);
return $stmt->execute();
}
function getUserID($username) {
$stmt = prepareQuery("
SELECT
@@ -363,5 +376,5 @@ function getRoleByID($userID) {
$stmt->bindParam(':userID', $userID);
$stmt->execute();
return $stmt;
return $stmt->fetch()["role"];
}