package edu.gatech.nutrack.model;

import android.content.Context;
import edu.gatech.nutrack.database.UserDataSource;

public class Authenticator {
	private Context context;
	
	public Authenticator(Context context) {
		this.context = context;
	}
	
	public boolean isPasswordValid(String input) {
		UserDataSource uds = new UserDataSource(context);
		uds.open();
		
		uds.close();
	}
}

@@ -263,34 +263,24 @@
 n is
-PasswordValid(String input
+UserValid(User u
 ) %7B%0A
@@ -351,22 +351,130 @@
 ;%0A%09%09
-%0A%09%09uds.close()
+User good = uds.getUser(u.getUsername(), u.getPassword(), u.getEmail(), u.getType());%0A%09%09uds.close();%0A%09%09return good == null
 ;%0A%09%7D

validate user method