<commit_before><?php

Class User extends CI_Model
{
	public function get_user()
	{
		$query = "SELECT * FROM users WHERE email = ? AND password = ?";
		$values = array($post['email'], md5($post['password']));
		return $this->db->query($query, $values)->row_array();
	}

	public function add_user()
	{
		
	}
}<commit_msg>Added login_verification, get_user, and add_user functions with queries<commit_after><?php

Class User extends CI_Model
{
	/*this function will query the database for an email/password match to login the user*/
	public function login_verification($post) 
	{
		$query = "SELECT * FROM users WHERE email = ? AND password = ?";
		$values = array($post['email'], md5($post['password']));
		return $this->db->query($query, $values)->row_array();
	}
	/*this function will query the database for a matching user ID and return first_name, last_name,
	email, billing_street, billing_city, billing_state, billing_zip, shipping_street, shipping_city,
	shipping_state, and shipping_zip*/
	public function get_user($id)
	{
		$query = "SELECT * FROM users where id = ?"
		$values = array($post['first_name'], $post['last_name'], $post['email'], $post['billing_street'], $post['billing_city'], $post['billing_state'],
			$post['billing_zip'], $post['shipping_street'], $post['shipping_city'], $post['shipping_state'], $post['shipping_zip']);
		return ($query, $values)->row_array();
	}
	/*this function will register a user*/
	public function add_user($post)
	{
		$query = "INSERT INTO users (first_name, last_name, email, password, billing_street, 
			billing_city, billing_state, billing_zip, shipping_street, shipping_city, shipping_state, 
			shipping_zip, admin_status, last_login, created_at, updated_at VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,NOW(),NOW(),NOW())";
		$values = array($post['first_name'], $post['last_name'], $post['email'], $post['password'], $post['billing_state'], $post['billing_city'],
			$post['billing_state'], $post['billing_zip'], $post['shipping_street'], $post['shipping_city'], $post['shipping_state'],
			$post['shipping_zip'], 'user');
		$this->db->query($query, $values);
	}
}
{'fraction_non_alphanumeric': 0.18095689246802463, 'fraction_numerical': 0.0009474182851729038, 'mean_word_length': 6.48936170212766, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3072237', 'n_tokens_mistral': 727, 'n_tokens_neox': 677, 'n_words': 164}