What do you mean by wixdata.user? There is no such thing.
The wix-data API is available in front end and backend. However, the wix-users API is only available in front end, while the wix-users-backend API is only available in backend code.
Check the documentation for each API to see where it can be used.