Backendless Support
 
Not a Problem

login result producing empty user

This just started happening recently. When a user logs in, the login responder is executed and returns a BackendlessUser with all null values:

email = null

objectid = null

password = null

properties

  • __class = "Users"

Leave a Comment

Comments (6)

photo
1

The password property will always be null - we do not return it back to the client side. However, I tried the same thing with the latest SDK for AS and the login works just fine for me. Are you using the latest version of the SDK?

photo
1

I think it's the latest SDK, it's whatever version you sent me with that had the Transient meta-data feature added.

I tried adding a new User and same thing... logging in returns that User with all properties null. I'll create a small sample project.

photo
1

Hi Devin!

Could you send me your sample project

(attach here or send to mark@backendless.com)?

Regards,

Kate.

photo
1

I produced a small sample app and it worked fine with that, so I figured it must've been something wrong with my actual app. This line of code seems to be the problem:

Backendless.Data.mapTableToClass("Users", User);

I was mapping the BackendlessUser class to my own User class. I've had this code in there for quite some time, and it's been working fine before. Has anything changed on the service that would break this?

photo
1

Hi, Devin,

Generally, you should never add mapping for Users class - just use our BackendlessUser class. I think it's just the matter of luck that you haven't had problems with that earlier.

Regards,

Sergey

photo
1

It was nice before, because when logging in or querying Users, it returned them already typed as my own User class. That would be nice feature to have. For now I can just manually convert to my User class.

Thanks

photo