<commit_before><?php

class UserController extends BaseController {
    /**
     * Attempt a login with the credentials in the POST.
     */
    public function doLogin()
    {
        $username = Input::get('username');
        $password = Input::get('password');
        $stay_logged_in = Input::get('remember');

        if (Auth::attempt(array('username' => $username, 'password' => $password), $stay_logged_in)) {
            return Redirect::route('root');
        } else {
            return Redirect::route('login')
                                ->exceptInput('password')
                                ->withErrors(array('' => 'Username or password invalid.'));

        }
    }

    /**
     * Show the login form to the user.
     */
    public function showLogin()
    {
        $user = new User();
        return View::make('user.login', array('user' => $user));
    }

    /**
     * Log out the current user.
     */
    public function doLogout()
    {
        if (Auth::user())
        {
            Auth::logout();
        }

        return Redirect::route('root');
    }
    
    /**
	 * Show the form for creating a new user.
	 *
	 * @return Response
	 */
	public function create()
	{
        $user = new User();

        return View::make('user.create', array('user' => $user));
	}

	/**
	 * Store a newly created user in the DB.
	 *
	 * @return Response
	 */
	public function store()
	{
        $inputs = Input::only('username', 'email', 'password', 'password_confirmation');
        $user = new User($inputs);<commit_msg>Remove unneeded variables from the UserController<commit_after><?php

class UserController extends BaseController {
    /**
     * Attempt a login with the credentials in the POST.
     */
    public function doLogin()
    {
        $username = Input::get('username');
        $password = Input::get('password');
        $stay_logged_in = Input::get('remember');

        if (Auth::attempt(array('username' => $username, 'password' => $password), $stay_logged_in)) {
            return Redirect::route('root');
        } else {
            return Redirect::route('login')
                                ->exceptInput('password')
                                ->withErrors(array('' => 'Username or password invalid.'));

        }
    }

    /**
     * Show the login form to the user.
     */
    public function showLogin()
    {
        return View::make('user.login');
    }

    /**
     * Log out the current user.
     */
    public function doLogout()
    {
        if (Auth::user())
        {
            Auth::logout();
        }

        return Redirect::route('root');
    }
    
    /**
	 * Show the form for creating a new user.
	 *
	 * @return Response
	 */
	public function create()
	{
        return View::make('user.create');
	}

	/**
	 * Store a newly created user in the DB.
	 *
	 * @return Response
	 */
	public function store()
	{
        $inputs = Input::only('username', 'email', 'password', '<PASSWORD>');
        $user = new User($inputs);
{'fraction_non_alphanumeric': 0.1493032514930325, 'fraction_numerical': 0.0, 'mean_word_length': 1.9587831207065751, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 16, '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': '2344164', 'n_tokens_mistral': 863, 'n_tokens_neox': 818, 'n_words': 216}