Hi guys,
I’m using a custom user class named User that has additional functions like postConstruct(). When I try to get the current user object using
user: User;
this.user = Parse.User.current();
the user object does not have the functions of my custom user class like postConstruct().
The call of this.user.postConstruct() leads to TypeError: this.user.postConstruct is not a function.
When I log the object I clearly see that it has no functions of my custom user class:
_objCount: 0
className: "_User"
id: "abcdefghij"
q Prototyp
_cleanupAuthData()
_isLinked(R)
_linkWith(R,P)
_logOutWith(R)
_logOutWithAll()
_preserveFieldsOnFetch()
_synchronizeAllAuthData()
_synchronizeAuthData(R)
_unlinkFrom(R,P)
_upgradeToRevocableSession(R)
authenticated()
constructor: function(R)
destroy()
fetch()
fetchWithInclude()
getEmail()
getSessionToken()
getUsername()
isCurrent()
isCurrentAsync()
linkWith(R,P)
logIn(R)
save()
setEmail(R)
setPassword(R)
setUsername(R)
signUp(R,P)
verifyPassword(R,P)
What am I doing wrong?
An interesting observation: When I reload the page right after the error above was thrown the postContsruct() function is called without any problems.
Thanks in advance.
Best regards
Valdes