<commit_before><?php
use \Model_mUser;
use \Model_mToken;


class Controller_LoginUser extends Controller_Rest
{

	public function action_Login()
	{
	    //post parameter
	    $mail = Input::post('mail');
	    $password = Input::post('password');
	    
	    //check validation
	    if (($mail == "") || ($password == "")) {
	        $this->Response(
	                array(
	                        'status'  => 401,
	                        'message'   => "Invalid Argument",
	                )
	        );
	        return;
	    }
	    
	    $m = new Model_mUser();
	    
	    try {
	        $data_user = $m->search_login($mail, $password);
	        
	        if ($data_user == 0) {
	            $this->Response(
	                    array(
	                            'status'    => 402,
	                            'message'   => "Not Exist User",
	                    )
	            );
	            return;
	        }
	        //Add Date: 09/09/2014 - Name :<NAME> Start
	        if($data_user['user_ban'] == 1)
	        {
	        	$this->Response(
	        			 array(
	                            'status'    => 408,
	                            'message'   => "User was banned",
	                    )
	        	);
	        	return;
	        }
	        //Add Date : 09/09/2014 - Name: <NAME> End
	        
	    } catch (Exception $e) {<commit_msg>aaaaaaa<commit_after><?php
use \Model_mUser;
use \Model_mToken;


class Controller_LoginUser extends Controller_Rest
{

	public function action_Login()
	{
	    //post parameter
	    $mail = Input::post('mail');
	    $password = Input::post('password');
	    
	    //check validation
	    if (($mail == "") || ($password == "")) {
	        $this->Response(
	                array(
	                        'status'  => 401,
	                        'message'   => "Invalid Argument",
	                )
	        );
	        return;
	    }
	    
	    $m = new Model_mUser();
	    
	    try {
	        $data_user = $m->search_login($mail, $password);
	        
	        if ($data_user == 0) {
	            $this->Response(
	                    array(
	                            'status'    => 402,
	                            'message'   => "Not Exist User",
	                    )
	            );
	            return;
	        }
	        //Add Date: 09/09/2014 - Name :<NAME> Starts
	        if($data_user['user_ban'] == 1)
	        {
	        	$this->Response(
	        			 array(
	                            'status'    => 408,
	                            'message'   => "User was banned",
	                    )
	        	);
	        	return;
	        }
	        //Add Date : 09/09/2014 - Name: <NAME> End
	        
	    } catch (Exception $e) {
{'fraction_non_alphanumeric': 0.13003324713705208, 'fraction_numerical': 0.01994828223125231, 'mean_word_length': 0.9985239852398524, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '5095542', 'n_tokens_mistral': 874, 'n_tokens_neox': 726, 'n_words': 152}