Is it possible to register a new account if there is already a local user authenticated?
Your code;
User newUser = new User();
newUser.userName = "username";
newUser.password = "password";
newUser.Update( (bool success, string error) => {
// NB: registration does not make the user logged
if (success)
Debug.Log("Save success: ID " + newUser.id);
else
Debug.Log("Save failed: " + error);
});
Works when there is no local user. But when I’m logged in, I’d like to create a new, different user for future purposes but I don’t want to logout or authenticate as this new user. Just have it created on the combu database.
Is this possible? The newUser.Update() fails if I’m already logged in.
May be we disabled this in the last versions for some issues, we can try to re-enable it again in the following weeks when coming back from summer holidays in the next 2 weeks. We will eventually get back here when it'll be done.
FRANCESCO CROCETTI @ SKARED CREATIONS
I tried to create a new account while localUser was already authenticated and it worked without any issue, what is your code and the result of Update?
Here is the code I used for the test (make sure you have the latest version 2.1.9 of Combu):
if (success) {
User u = new User();
u.userName = "bb";
u.password = "bb";
u.Update((bool arg1, string arg2) => {
Debug.Log("created: " + arg1 + " - error: " + arg2);
});
}
});
FRANCESCO CROCETTI @ SKARED CREATIONS