I need to get `user` and save it to variable.

```
public class MainActivity extends ActionBarActivity 
{
    User user = new LoginTask2().execute("");
}

class LoginTask2 extends AsyncTask<String, Void, User> {
    private Exception exception;
    public String hash = "";

    protected String doInBackground(String... t) {
        RestClient restClient = new HttpRestClient();
        restClient.setUserAgent("bot/1.0 by name");

        // Connect the user
        User user = new User(restClient, "User", "somepass");
        try {
            user.connect();
            //hash = user.getModhash();
            return user;
        } catch (Exception e) {
            e.printStackTrace();
            this.exception = e;
            return null;
        }
    }

    protected void onPostExecute(String string) {

    }
}

```

It looks like it work, but I don't know how to get `user`. With this code I get error:

```
Error:(49, 47) error: incompatible types
required: String
found:    AsyncTask<String,Void,String>

```

Could someone give me advice how to change code?