Hi,
I want to update user information, but cannot log in. I have consulted the [Documentation].
I get a handleFault response callback saying invalid username and password. I do know i have the correct username,
but I do not have the right password. How do I get the correct password from backendless so that I can log in and update the user’s information.
Regards
Rhonwen
I see that you cannot get the password for security reasons. How do I programmatically change the user’s password so that I can log in to update the user’s information?
Hi I found a way to achieve my goal. Thank you anyway. See code below:
DataQueryBuilder builder = DataQueryBuilder.create();
builder.setWhereClause("email = '"+list.get(position).getEmail()+ "'");
Backendless.Persistence.of(BackendlessUser.class).find(builder, new AsyncCallback<List<BackendlessUser>>() {
@Override
public void handleResponse(List<BackendlessUser> response)
{
if(accepted.isChecked()) {
response.get(0).setProperty("accepted", "TRUE");
Backendless.UserService.update(response.get(0), new AsyncCallback<BackendlessUser>() {
@Override
public void handleResponse(BackendlessUser response) {
Toast.makeText(context, "User updated", Toast.LENGTH_LONG).show();
}
@Override
public void handleFault(BackendlessFault fault) {
}
});
}
else
{
response.get(0).setProperty("accepted", "FALSE");
Backendless.UserService.update(response.get(0), new AsyncCallback<BackendlessUser>() {
@Override
public void handleResponse(BackendlessUser response) {
Toast.makeText(context, "User updated", Toast.LENGTH_LONG).show();
}
@Override
public void handleFault(BackendlessFault fault) {
}
});
}
}
@Override
public void handleFault(BackendlessFault fault) {
}
});