i want to get property of backendless user
i’m saving the backendless user in a var after login and i’m trying to set its values in another backendless user and i want to return the new backendless user for some reason.
the problem is i tried different way too access property ex:
user.GetProperty(“name”)
user.getProperty(“name”)
user.name
user[“name”]
Code:
var user=Backendless.UserService.login( person.phone, person.password, true );
var person = new Backendless.User();
person[ “firstName” ]= user[ “firstName” ];
person[ “lastName” ]= user[ “lastName” ]
return person;
Backendless.UserService.login
is a non- blocking call which returns a Promise
. Therefore the user
variable will not contain a user object and instead, it will be a Promise
. See the example here on how to get the user object with a non-blocking call.
Regards,
Mark
Thank you