Bug? wix-users-backend

The api example for wix-users-backend>getCurrentUser returns a user object (as expected), however the example also shows user.getEmail() function - which fails with an error, despite using the sample code exactly without modification.
Is this example wrong??
How else can I retrieve the user’s email in backend code??