title: How to update multiple users from an administrator user in parse.com for android app
body: <p>I am building an app there are a few users that are administrators. from these users I want them to be able to update others users info. below is what i came up with so far , but I am having trouble passing the users info. can some one help?</p>
  
  <p>where I am having most trouble is selecting the user to be updated. the previous activity was a listview that pases the object string. I get them to correctly show on the necessary edittext but when I click the save button it does not update the user field.</p>
  
  <p>Remember I do not want to update currentUser, I want to update a different user</p>
  
  <pre><code>import android.app.Activity;
  import android.app.AlertDialog;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import com.parse.FindCallback;
  import com.parse.GetCallback;
  import com.parse.ParseException;
  import com.parse.ParseObject;
  import com.parse.ParseQuery;
  import com.parse.ParseUser;
  
  import java.util.List;
  
  
  public class FullUserInfoActivity extends Activity {
      String objectId;
      protected EditText mName_FullUm;
      protected EditText mLname_FullUm;
      protected EditText mEmail_FullUm;
      protected TextView mHashid_FullUm;
      protected Button mPassword_FullUm;
      protected Button mUpdateUserFum;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_full_user_info);
  
          //initialize
          mName_FullUm = (EditText) findViewById(R.id.nameFum);
          mLname_FullUm = (EditText) findViewById(R.id.lnamefullUm);
          mEmail_FullUm = (EditText) findViewById(R.id.emailFum);
          mHashid_FullUm = (TextView) findViewById(R.id.hashIdFum);
          mPassword_FullUm = (Button) findViewById(R.id.forgotPasswordBtn);
          mUpdateUserFum = (Button) findViewById(R.id.updateUserFumButton);
  
  
          //get the Intent
  
          Intent intent = getIntent();
          objectId = intent.getStringExtra("objectId");
  
          final ParseQuery query = ParseUser.getQuery();
          query.getInBackground(objectId, new GetCallback&lt;ParseObject&gt;() {
              @Override
              public void done(ParseObject parseObject, ParseException e) {
                  if (e == null) {
                      //Success we have Report
  
  
                      String hashid = parseObject.getString("username").toString();
                      String name = parseObject.getString("name").toString();
                      String lname = parseObject.getString("lastname").toString();
                      String email = parseObject.getString("email").toString();
  
  
                      mHashid_FullUm.setText(hashid);
                      mName_FullUm.setText(name);
                      mLname_FullUm.setText(lname);
                      mEmail_FullUm.setText(email);
  
  
                  } else {
                      //Something Happened
  
                      //sorry there was a problem
                      AlertDialog.Builder builder = new AlertDialog.Builder(FullUserInfoActivity.this);
                      builder.setMessage(e.getMessage());
                      builder.setTitle(R.string.error_login_title);
                      builder.setPositiveButton(R.string.error_confirmation, new DialogInterface.OnClickListener() {
                          @Override
                          public void onClick(DialogInterface dialog, int which) {
                              //close the dialog
                              dialog.dismiss();
                          }
                      });
                      AlertDialog dialog = builder.create();
                      dialog.show();
  
  
                  }
  
  
              }
          });
          addListenerOnButton();
  
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_full_user_info, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  
  
      public void addListenerOnButton() {
          mUpdateUserFum.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
  
                  ParseQuery&lt;ParseUser&gt; query = ParseUser.getQuery();
                  query.whereEqualTo("objectId",objectId);
                  query.findInBackground(new FindCallback&lt;ParseUser&gt;() {
                      public void done(List&lt;ParseUser&gt; userUpdate, ParseException e) {
                          if (e == null) {
                              // Now let's update it with some new data.
                              // will get sent to the Parse Cloud. playerName hasn't changed.
                              userUpdate.set("lastname", mLname_FullUm);
                              userUpdate.set("name", mName_FullUm);
                              userUpdate.set("email", mEmail_FullUm);
                              Toast.makeText(FullUserInfoActivity.this, R.string.report_save_confirmation, Toast.LENGTH_LONG).show();
                              userUpdate.saveInBackground();
  
  
                          } else {
  
                              //sorry there was a problem
                              AlertDialog.Builder builder = new AlertDialog.Builder(FullUserInfoActivity.this);
                              builder.setMessage(e.getMessage());
                              builder.setTitle(R.string.error_login_title);
                              builder.setPositiveButton(R.string.error_confirmation, new DialogInterface.OnClickListener() {
                                  @Override
                                  public void onClick(DialogInterface dialog, int which) {
                                      //close the dialog
                                      dialog.dismiss();
                                  }
                              });
                              AlertDialog dialog = builder.create();
                              dialog.show();
  
  
                          }
                      }
                  });
  
              }
          });
  
      }
  }
  </code></pre>
  
  <p>UPDATE: I reformulated the code but I need help in the area.</p>
  
  <pre><code>public void addListenerOnButton() {
      mUpdateUserFum.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              ParseQuery&lt;ParseUser&gt; query = ParseUser.getQuery();
              //ParseQuery&lt;ParseObject&gt; query = ParseQuery.getQuery("_User");
              query.whereEqualTo("objectId", objectId);
              // Retrieve the object by id
              query.findInBackground(new FindCallback&lt;ParseUser&gt;() {
                  public void done(List&lt;ParseUser&gt; objects, ParseException e) {
                      if (e == null) {
                          // Now let's update it with some new data. In this case, only cheatMode and score
                          // will get sent to the Parse Cloud. playerName hasn't changed.
                          Toast.makeText(FullUserInfoActivity.this, objectId, Toast.LENGTH_LONG).show();
  
                      } else {
  
                          //sorry there was a problem
                          AlertDialog.Builder builder = new AlertDialog.Builder(FullUserInfoActivity.this);
                          builder.setMessage(e.getMessage());
                          builder.setTitle(R.string.error_login_title);
                          builder.setPositiveButton(R.string.error_confirmation, new DialogInterface.OnClickListener() {
                              @Override
                              public void onClick(DialogInterface dialog, int which) {
                                  //close the dialog
                                  dialog.dismiss();
                              }
                          });
                          AlertDialog dialog = builder.create();
                          dialog.show();
  
  
                      }
                  }
              });
  
          }
      });
  
  }
  </code></pre>
  
  <p>@ariefbayu: how do I apply this concept to my parseUser object. I know how to assign to a normal object, but for what I understand Users are Special objects. I know parse.com recommends </p>
  
  <pre><code>    ParseQuery&lt;ParseUser&gt; query = ParseUser.getQuery();
  query.whereEqualTo("gender", "female");
  query.findInBackground(new FindCallback&lt;ParseUser&gt;() {
    public void done(List&lt;ParseUser&gt; objects, ParseException e) {
      if (e == null) {
          // The query was successful.
      } else {
          // Something went wrong.
      }
    }
  });
  </code></pre>
  
  <p>but I dont understand how to choose the a different user and assign the new values.</p>