Can you do a console.log(JSON.stringify(user)); to see what user attributes are available in the script?
console.log(JSON.stringify(user));