func updateCurrentUserPropsSync() {
Types.tryblock({ () -> Void in
self.backendless?.userService.login("anthony.hayek@live.com", password: "anthony")
let currentUser = self.backendless?.userService.currentUser
print("User has been logged in (SYNC): \(currentUser)")
let properties = [
"email" : "Agent 007"
]
currentUser?.updateProperties( properties )
let updatedUser = self.backendless?.userService.update(currentUser)
print("User updated (SYNC): \(updatedUser)")
},
catchblock: { (exception) -> Void in
print("Server reported an error: \(exception)" )
})
}
thats the code im using to update my users email, how can i do the same without self.backendless?.userService.login("anthony.hayek@live.com", password: “anthony”)
what i mean is that i wanna adentify the user i wanna change its email by another method,
using his facebook id for example
?