<commit_before><?php

class User_model extends CI_Model
{
	function __construct()
	{}

	function login()
	{
		$email = $this->input->post('email');
		$passwd = $this->input->post('password');
		$q = $this 
					->db
					->where ('email', $email)
					->where ('password', md5($passwd))
					->get('users');
		//Check if it returns only one row
		if ($q->num_rows()  == 1 )
		{
			//DO SOMETHING
			return true;
		}
		//If more then there is an error
		else if ( $q->num_rows() > 1)
		{
			echo ' SOMETHING WRONG ';
		}
		else
		{
			return false;
		}
	}

	function register_user()
	{
		$data = array(
			'uid'			=>	'',
			'email'			=>	$this->input->post('email'),
			'password' 		=> 	<PASSWORD>($this->input->post('password')),
			'username' 		=> 	$this->input->post('username'),
			'first_name' 	=> 	$this->input->post('first_name'),
			'last_name' 	=> 	$this->input->post('last_name'),
			'about_you' 	=> 	"",
			'location'		=>	"",
			'website' 		=> 	"",
			'profile_pic' 	=> 	"",
			// 'creation_date'	=>	"CURRENT_TIMESTAMP()",
			'DOB'			=>	$this->input->post('DOB'),
			'gender' 		=> 	"",
			'nick_name' 	=> 	$this->input->post('username'));

		return  $this->db->insert('users', $data);
	}

	function load_profile()
	{
		//load boards/pins/likes/etc
	}

	function edit_profile()
	{
		$data = array(
			'uid'			=>	$this->input->post('uid'),
			'email'			=>	$this->input->post('email'),
			// 'password' 		=> 	$this->input->post('password'),
			'username' 		=> 	$this->input->post('username'),<commit_msg>Default profile pic is set when you register<commit_after><?php

class User_model extends CI_Model
{
	function __construct()
	{}

	function login()
	{
		$email = $this->input->post('email');
		$passwd = $this->input->post('password');
		$q = $this 
					->db
					->where ('email', $email)
					->where ('password', <PASSWORD>($passwd))
					->get('users');
		//Check if it returns only one row
		if ($q->num_rows()  == 1 )
		{
			//DO SOMETHING
			return true;
		}
		//If more then there is an error
		else if ( $q->num_rows() > 1)
		{
			echo ' SOMETHING WRONG ';
		}
		else
		{
			return false;
		}
	}

	function register_user()
	{
		$data = array(
			'uid'			=>	'',
			'email'			=>	$this->input->post('email'),
			'password' 		=> 	<PASSWORD>($<PASSWORD>->post('password')),
			'username' 		=> 	$this->input->post('username'),
			'first_name' 	=> 	$this->input->post('first_name'),
			'last_name' 	=> 	$this->input->post('last_name'),
			'about_you' 	=> 	"",
			'location'		=>	"",
			'website' 		=> 	"",
			'profile_pic' 	=> 	"assets/img/default.jpg",
			// 'creation_date'	=>	"CURRENT_TIMESTAMP()",
			'DOB'			=>	$this->input->post('DOB'),
			'gender' 		=> 	"",
			'nick_name' 	=> 	$this->input->post('username'));

		return  $this->db->insert('users', $data);
	}

	function load_profile()
	{
		//load boards/pins/likes/etc
	}

	function edit_profile()
	{
		$data = array(
			'uid'			=>	$this->input->post('uid'),
			'email'			=>	$this->input->post('email'),
			// 'password' 		=> 	$<PASSWORD>('password'),
			'username' 		=> 	$this->input->post('username'),
{'fraction_non_alphanumeric': 0.22884114583333334, 'fraction_numerical': 0.0016276041666666667, 'mean_word_length': 2.9805699481865284, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 111, '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': '5374662', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1230, 'n_words': 205}