mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 06:13:51 +00:00
Merge pull request #3060 from overleaf/cmg-wfh-export-updates
WFH Export: Account for user being undefined GitOrigin-RevId: 8e653fda6eaea3cdde8e5677f24ef39c1c97bb94
This commit is contained in:
parent
21de9041fe
commit
52fafa96c5
1 changed files with 10 additions and 6 deletions
|
@ -28,12 +28,16 @@ db.deletedSubscriptions.aggregate(
|
|||
10,
|
||||
function(userId, callback) {
|
||||
db.users.findOne(userId, function(err, user) {
|
||||
const emails = user.emails.map(email => email.email)
|
||||
console.log(
|
||||
`${user._id},${user.first_name || ''},${user.last_name || ''},${
|
||||
user.signUpDate
|
||||
},${emails.join(',')}`
|
||||
)
|
||||
if (user) {
|
||||
const emails = user.emails.map(email => email.email)
|
||||
console.log(
|
||||
`${user._id},${user.first_name || ''},${user.last_name || ''},${
|
||||
user.signUpDate
|
||||
},${emails.join(',')}`
|
||||
)
|
||||
} else {
|
||||
console.error('A group user was not found')
|
||||
}
|
||||
callback(err)
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue