Merge pull request #6093 from overleaf/jpa-last-user-activity

[web] add a last active date for denoting account activity in groups mgt

GitOrigin-RevId: 32a9e5c1e8f63e794bf6d379685b6dda7e6d4d22
This commit is contained in:
Timothée Alby
2021-12-15 09:05:34 +00:00
committed by Copybot
parent 5eed78a3e8
commit 00e792b022
9 changed files with 47 additions and 10 deletions
@@ -664,6 +664,12 @@ const ProjectController = {
if (userId == null) {
cb(null, defaultSettingsForAnonymousUser(userId))
} else {
User.updateOne(
{ _id: ObjectId(userId) },
{ $set: { lastActive: new Date() } },
{},
() => {}
)
User.findById(
userId,
'email first_name last_name referal_id signUpDate featureSwitches features featuresEpoch refProviders alphaProgram betaProgram isAdmin ace',