Start a new topic

User signup with optional fields

Hi! I have this code:


 

mKinveyClient.user().create(correo,password, new KinveyUserCallback() {
                    @Override
                    public void onSuccess(User user) {
                        CharSequence text = user.getUsername() + ", your account has been created.";
                        user.put("nombre", usuario);
                        user.put("apellido", apellido);
                        user.put("correo", correo);
                        
                        Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show();
                    }

                    @Override
                    public void onFailure(Throwable error) {
                        String code = error.toString() + " \n" + error.getCause() + " \n" + error.getMessage();
                        CharSequence text = "Could not sign up. " + code;
                        Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show();

                    }
                });

 


Then I look on the Users in the kinvey console and the nombre, apellido and email columns aren't there.


Hi, you should call user.put before the create call !

Hi Dan,


Once a user is modified locally, it needs to be saved to push the changes to the server. This documentation link has the update method call you need to put below your user.put() method calls.


Let me know if you have any other queries.



Regards,

Wani

Kinvey Support

In that case I guess you should fix the Signin sample project you have on the website because I was following this project.

Thanks for pointing that out.


I'm going to flag the app and specifically RegisterNewAccountActivity.java file for update.


Regards,

Wani

Login or Signup to post a comment