<commit_before><?php
$access_item = false;
if(isset($read_access) && $read_access) {
	return;
}

include_once($_SERVER["FRAMEWORK_PATH"]."/config/init.php");


$action = $page->actions();
$model = new User();


$page->bodyClass("login");
$page->pageTitle("Login");


if(is_array($action) && count($action)) {

	// login/forgot
	if(count($action) == 1 && $action[0] == "forgot") {

		$page->page(array(
			"templates" => "pages/forgot_password.php"
		));
		exit();
	}
	// login/forgot/receipt
	else if(count($action) == 2 && $action[0] == "forgot" && $action[1] == "receipt") {

		$page->page(array(
			"templates" => "pages/forgot_password_receipt.php"
		));
		exit();
	}
	// login/requestReset
	else if(count($action) == 1 && $action[0] == "requestReset" && security()->validateCsrfToken()) {

		// request password reset
		if($model->requestPasswordReset($action)) {
			header("Location: forgot/receipt");
			exit();
		}

		// could not create reset request
		else {
			message()->addMessage("Sorry, you cannot reset the password for the specified user!", array("type" => "error"));
			header("Location: forgot");
			exit();
		}
	}
}<commit_msg>Use janitor layout<commit_after><?php
$access_item = false;
if(isset($read_access) && $read_access) {
	return;
}

include_once($_SERVER["FRAMEWORK_PATH"]."/config/init.php");


$action = $page->actions();
$model = new User();


$page->bodyClass("login");
$page->pageTitle("Login");


if(is_array($action) && count($action)) {

	// login/forgot
	if(count($action) == 1 && $action[0] == "forgot") {

		$page->page(array(
			"type" => "janitor",
			"templates" => "pages/forgot_password.php"
		));
		exit();
	}
	// login/forgot/receipt
	else if(count($action) == 2 && $action[0] == "forgot" && $action[1] == "receipt") {

		$page->page(array(
			"type" => "janitor",
			"templates" => "pages/forgot_password_receipt.php"
		));
		exit();
	}
	// login/requestReset
	else if(count($action) == 1 && $action[0] == "requestReset" && security()->validateCsrfToken()) {

		// request password reset
		if($model->requestPasswordReset($action)) {
			header("Location: forgot/receipt");
			exit();
		}

		// could not create reset request
		else {
			message()->addMessage("Sorry, you cannot reset the password for the specified user!", array("type" => "error"));
			header("Location: forgot");
			exit();
		}
	}
}
{'fraction_non_alphanumeric': 0.21729867916489135, 'fraction_numerical': 0.005965061780997018, 'mean_word_length': 4.397701149425288, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '1730265', 'n_tokens_mistral': 898, 'n_tokens_neox': 810, 'n_words': 152}