mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
update timestamp when user logs in (#15489)
* update timestamp when user logs in * fix(comment): typo --------- Co-authored-by: Kalista Payne <sabrecat@gmail.com>
This commit is contained in:
@@ -121,8 +121,10 @@ api.loginLocal = {
|
||||
// convert the hashed password to bcrypt from sha1
|
||||
if (user.auth.local.passwordHashMethod === 'sha1') {
|
||||
await passwordUtils.convertToBcrypt(user, password);
|
||||
await user.save();
|
||||
}
|
||||
// Force the updated timestamp to update, so that we know they logged in
|
||||
user.auth.timestamps.updated = new Date();
|
||||
await user.save();
|
||||
|
||||
res.analytics.track('login', {
|
||||
category: 'behaviour',
|
||||
|
||||
Reference in New Issue
Block a user