public void setUserInfo ( final String newPassword , String email , String displayName , Map extraInfo , final KickflipCallback cb ) { if ( ! assertActiveUserAvailable ( cb ) ) return ; GenericData data = new GenericData ( ) ; final String finalPassword ; if ( newPassword != null ) { data . put ( "new_password" , newPassword ) ; finalPassword = newPassword ; } else { finalPassword = getPasswordForActiveUser ( ) ; } if ( email != null ) data . put ( "email" , email ) ; if ( displayName != null ) data . put ( "display_name" , displayName ) ; if ( extraInfo != null ) data . put ( "extra_info" , new Gson ( ) . toJson ( extraInfo ) ) ; post ( EDIT_USER , new UrlEncodedContent ( data ) , User . class , new KickflipCallback ( ) { @ Override public void onSuccess ( final Response response ) { if ( VERBOSE ) Log . i ( TAG , "setUserInfo response: " + response ) ; storeNewUserResponse ( ( User ) response , finalPassword ) ; postResponseToCallback ( cb , response ) ; } @ Override public void onError ( final KickflipException error ) { Log . w ( TAG , "setUserInfo Error: " + error ) ; postExceptionToCallback ( cb , error ) ; } } ) ; }
Set the current active user s meta info . Pass a null argument to leave it as - is .