1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 00:25:17 +00:00

Update last user activity

This commit is contained in:
2020-03-28 15:21:06 +01:00
parent d443551405
commit 17407f964b
3 changed files with 30 additions and 5 deletions

View File

@ -225,6 +225,23 @@ export class AccountHelper {
return result == null ? -1 : result.ID;
}
/**
* Update the last activity time of the user
*
* @param userID Target user ID
*/
public static async UpdateLastActivity(userID: number) {
await DatabaseHelper.UpdateRows({
table: USER_TABLE,
where: {
ID: userID
},
set: {
last_activity: time()
}
})
}
/**
* Check out whether a virtual directory is available or not