BicepBuddyApp/src/main/java/User/UserDB.java
public void addUser(User u, String password) {
		try {
			BufferedWriter buf = new BufferedWriter(new FileWriter(filename, true));
			
			Master.appLogger.info(":: Adding new user " + u.getfName() + " " + u.getlName() + " to DB.");
			String lineContent = "";

			lineContent += u.getEmail(); //0
			lineContent += ",";
			lineContent += password; //1
			lineContent += ",";
			lineContent += u.getfName(); // 2
			lineContent += ",";
			lineContent += u.getlName(); // 3
			lineContent += ",";
			lineContent += u.getStyle(); // 4
			lineContent += ",";
			lineContent += u.getTimeOfDay(); // 5
			lineContent += ",";
			
			lineContent += u.getGender(); // 6
			lineContent += ",";
			lineContent += u.getPrefGender(); // 7
			lineContent += ",";
			lineContent += u.getFrequency(); // 8
			lineContent += ",";
			lineContent += u.getWeight(); // 9
			lineContent += ",";
			lineContent += u.getPhone(); // 10
			lineContent += ",";
			lineContent += u.getAge(); // 11
			lineContent += ",";
			lineContent += u.getGoals(); // 12
			lineContent += ",";
			lineContent += u.getExperience(); // 13
			
			buf.write(lineContent);
			buf.newLine();
			
			buf.close();
		}
		catch(Exception e) {
			Master.appLogger.warning(":: File could not be opened.");
		}
	}
//TODO: STORE HASHES OF PASSWORD, NOT PLAINTEXT
STORE HASHES OF PASSWORD, NOT PLAINTEXT
STORE HASHES OF PASSWORD NOT PLAINTEXT
public void addUser(User u, String password) {
		try {
			BufferedWriter buf = new BufferedWriter(new FileWriter(filename, true));
			Master.appLogger.info(":: Adding new user " + u.getfName() + " " + u.getlName() + " to DB.");
			String lineContent = "";
			lineContent += u.getEmail(); 
			lineContent += ",";
			lineContent += password; 
			lineContent += ",";
			lineContent += u.getfName(); 
			lineContent += ",";
			lineContent += u.getlName(); 
			lineContent += ",";
			lineContent += u.getStyle(); 
			lineContent += ",";
			lineContent += u.getTimeOfDay(); 
			lineContent += ",";
			lineContent += u.getGender(); 
			lineContent += ",";
			lineContent += u.getPrefGender(); 
			lineContent += ",";
			lineContent += u.getFrequency(); 
			lineContent += ",";
			lineContent += u.getWeight(); 
			lineContent += ",";
			lineContent += u.getPhone(); 
			lineContent += ",";
			lineContent += u.getAge(); 
			lineContent += ",";
			lineContent += u.getGoals(); 
			lineContent += ",";
			lineContent += u.getExperience(); 
			buf.write(lineContent);
			buf.newLine();
			buf.close();
		}
		catch(Exception e) {
			Master.appLogger.warning(":: File could not be opened.");
		}
	}
public void addUser ( User u , String password ) { try { BufferedWriter buf = new BufferedWriter ( new FileWriter ( filename , true ) ) ; Master . appLogger . info ( ":: Adding new user " + u . getfName ( ) + " " + u . getlName ( ) + " to DB." ) ; String lineContent = "" ; lineContent += u . getEmail ( ) ; lineContent += "," ; lineContent += password ; lineContent += "," ; lineContent += u . getfName ( ) ; lineContent += "," ; lineContent += u . getlName ( ) ; lineContent += "," ; lineContent += u . getStyle ( ) ; lineContent += "," ; lineContent += u . getTimeOfDay ( ) ; lineContent += "," ; lineContent += u . getGender ( ) ; lineContent += "," ; lineContent += u . getPrefGender ( ) ; lineContent += "," ; lineContent += u . getFrequency ( ) ; lineContent += "," ; lineContent += u . getWeight ( ) ; lineContent += "," ; lineContent += u . getPhone ( ) ; lineContent += "," ; lineContent += u . getAge ( ) ; lineContent += "," ; lineContent += u . getGoals ( ) ; lineContent += "," ; lineContent += u . getExperience ( ) ; buf . write ( lineContent ) ; buf . newLine ( ) ; buf . close ( ) ; } catch ( Exception e ) { Master . appLogger . warning ( ":: File could not be opened." ) ; } }
TODO: STORE HASHES OF PASSWORD, NOT PLAINTEXT
TODO : STORE HASHES OF PASSWORD NOT PLAINTEXT
//0 //1 // 2 // 3 // 4 // 5 // 6 // 7 // 8 // 9 // 10 // 11 // 12 // 13