Removed name

master
Keith Irwin 2017-05-06 23:57:55 -04:00
parent 3c3ed65978
commit 2edf9b728f
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
1 changed files with 1 additions and 4 deletions

View File

@ -209,18 +209,16 @@ public class LoginActivity extends AppCompatActivity implements
String userString = res.body().string(); String userString = res.body().string();
System.out.println("Full response: " + userString); System.out.println("Full response: " + userString);
String userID, userName, userSK; String userID, userSK;
try { try {
JSONObject user = new JSONObject(userString); JSONObject user = new JSONObject(userString);
userID = user.getString("_id"); userID = user.getString("_id");
userName = user.getString("name");
userSK = user.getString("sk32"); userSK = user.getString("sk32");
Log.v(TAG, "User retrieved with ID: " + userID); Log.v(TAG, "User retrieved with ID: " + userID);
} catch (JSONException e) { } catch (JSONException e) {
Log.e(TAG, "Unable to parse user JSON: ", e); Log.e(TAG, "Unable to parse user JSON: ", e);
Log.e(TAG, "JSON String used: " + userString); Log.e(TAG, "JSON String used: " + userString);
userID = null; userID = null;
userName = null;
userSK = null; userSK = null;
} }
@ -229,7 +227,6 @@ public class LoginActivity extends AppCompatActivity implements
SharedPreferences.Editor editor = sharedPref.edit(); SharedPreferences.Editor editor = sharedPref.edit();
editor.putString("loggedInUser", userString); editor.putString("loggedInUser", userString);
editor.putString("loggedInUserId", userID); editor.putString("loggedInUserId", userID);
editor.putString("loggedInUserName", userName);
editor.putString("loggedInUserSk", userSK); editor.putString("loggedInUserSk", userSK);
editor.commit(); editor.commit();