<commit_before><%@ page session="false" language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.Locale"%>
<%@ page import="org.skyve.CORE"%>
<%@ page import="org.skyve.metadata.customer.Customer"%>
<%@ page import="org.skyve.util.Util"%>
<%@ page import="org.skyve.impl.util.UtilImpl"%>
<%@ page import="org.skyve.web.WebContext"%>
<%@ page import="org.skyve.impl.web.WebUtil"%>
<%@ page import="org.skyve.impl.web.UserAgent"%>
<%
	String basePath = Util.getSkyveContextUrl() + "/";
	String customer = WebUtil.determineCustomerWithoutSession(request);

	// Check if this was a login error
	boolean loginError = (request.getParameter("error") != null);

	// Clear the user object from the session if it exists
	// If there is a public user set, this will ensure it doesn't get in the way.

	HttpSession session = request.getSession(false);
	if (session != null) {
		Object user = session.getAttribute(WebContext.USER_SESSION_ATTRIBUTE_NAME);
		if (user != null) {
			session.removeAttribute(WebContext.USER_SESSION_ATTRIBUTE_NAME);
		}
	}
	
	// Determine the locale
	Locale locale = request.getLocale();
	if (customer != null) {
		try {
			Customer c = CORE.getRepository().getCustomer(customer);
			if (c != null) {
				String languageTag = c.getLanguageTag();
				if (languageTag != null) {
					locale = Locale.forLanguageTag(languageTag);
				}
			}
		}
		catch (Exception e) {
			// cannot get locale - do nothing
		}
	}
	
	String customerFieldName = "customer";
	String userFieldName = "user";

	boolean mobile = UserAgent.getType(request).isMobile();
	
	// is self-registration enabled
	boolean allowRegistration = UtilImpl.ACCOUNT_ALLOW_SELF_REGISTRATION;
%>
<!DOCTYPE html>
<html dir="<%=Util.isRTL(locale) ? "rtl" : "ltr"%>"><commit_msg>Invalidate session on login page.<commit_after><%@ page session="false" language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.Locale"%>
<%@ page import="org.skyve.CORE"%>
<%@ page import="org.skyve.metadata.customer.Customer"%>
<%@ page import="org.skyve.util.Util"%>
<%@ page import="org.skyve.impl.util.UtilImpl"%>
<%@ page import="org.skyve.web.WebContext"%>
<%@ page import="org.skyve.impl.web.WebUtil"%>
<%@ page import="org.skyve.impl.web.UserAgent"%>
<%
	String basePath = Util.getSkyveContextUrl() + "/";
	String customer = WebUtil.determineCustomerWithoutSession(request);

	// Check if this was a login error
	boolean loginError = (request.getParameter("error") != null);

	// Clear the user object from the session if it exists
	// If there is a public user set, this will ensure it doesn't get in the way.

	HttpSession session = request.getSession(false);
	if (session != null) {
		session.removeAttribute(WebContext.USER_SESSION_ATTRIBUTE_NAME);
		session.invalidate();
	}
	
	// Determine the locale
	Locale locale = request.getLocale();
	if (customer != null) {
		try {
			Customer c = CORE.getRepository().getCustomer(customer);
			if (c != null) {
				String languageTag = c.getLanguageTag();
				if (languageTag != null) {
					locale = Locale.forLanguageTag(languageTag);
				}
			}
		}
		catch (Exception e) {
			// cannot get locale - do nothing
		}
	}
	
	String customerFieldName = "customer";
	String userFieldName = "user";

	boolean mobile = UserAgent.getType(request).isMobile();
	
	// is self-registration enabled
	boolean allowRegistration = UtilImpl.ACCOUNT_ALLOW_SELF_REGISTRATION;
%>
<!DOCTYPE html>
<html dir="<%=Util.isRTL(locale) ? "rtl" : "ltr"%>">
{'fraction_non_alphanumeric': 0.15500141683196372, 'fraction_numerical': 0.0011334655709832814, 'mean_word_length': 4.576619273301738, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '6714657', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1146, 'n_words': 264}