Open drfaustusfade opened 3 years ago
user already have las logged in attribute right?
it was removed at some point that should be set for better tracking of user loggins on login and password reset also, scripts to update user collection with last_logged_in if none out of updatedAt is needed
so for the scripts just set last_logged_in same as updatedAt ?
updated on branch : https://github.com/fakhrihawari/ngm-reportHub/tree/add-atribute-last-loggedin https://github.com/fakhrihawari/ngm-reportEngine/tree/add-lastlogged-fo-user
so for the scripts just set last_logged_in same as updatedAt ? yes
updated on branch : https://github.com/fakhrihawari/ngm-reportHub/tree/add-atribute-last-loggedin https://github.com/fakhrihawari/ngm-reportEngine/tree/add-lastlogged-fo-user
- right, please also check for other User Collection addition of last_logged_in attribute
- import moment on top of the file rather than on functions
updated on branch : https://github.com/fakhrihawari/ngm-reportHub/tree/add-atribute-last-loggedin https://github.com/fakhrihawari/ngm-reportEngine/tree/add-lastlogged-fo-user
- right, please also check for other User Collection addition of last_logged_in attribute
- import moment on top of the file rather than on functions
okay
Sripts db.user.find({"last_logged_in":{$exists: false}}).forEach(function(u){u.last_logged_in = u.updatedAt; db.user.save(u)}); db.userhistory.find({"last_logged_in":{$exists: false}}).forEach(function(u){u.last_logged_in = u.updatedAt; db.userhistory.save(u)}); db.userloginhistory.find({"last_logged_in":{$exists: false}}).forEach(function(u){u.last_logged_in = u.updatedAt; db.userloginhistory.save(u)});
updated on branch : https://github.com/fakhrihawari/ngm-reportHub/tree/add-atribute-last-loggedin https://github.com/fakhrihawari/ngm-reportEngine/tree/add-lastlogged-fo-user
- right, please also check for other User Collection addition of last_logged_in attribute
- import moment on top of the file rather than on functions
you mean in another user collection in another db?
updated on branch : https://github.com/fakhrihawari/ngm-reportHub/tree/add-atribute-last-loggedin https://github.com/fakhrihawari/ngm-reportEngine/tree/add-lastlogged-fo-user
- right, please also check for other User Collection addition of last_logged_in attribute
- import moment on top of the file rather than on functions
you mean in another user collection in another db?
if on other user-related collections that attribute should be added, like UserLoginHistory
updated on branch : https://github.com/fakhrihawari/ngm-reportHub/tree/add-atribute-last-loggedin https://github.com/fakhrihawari/ngm-reportEngine/tree/add-lastlogged-fo-user
- right, please also check for other User Collection addition of last_logged_in attribute
- import moment on top of the file rather than on functions
you mean in another user collection in another db?
if on other user-related collections that attribute should be added, like UserLoginHistory
okay
add last logged in attribute, as updatedAt could be due to other reasons