Project

General

Profile

« Previous | Next » 

Revision 158d9aa6

Added by Scott Ullrich over 15 years ago

Show ajax properly

View differences:

etc/inc/auth.inc
858 858
}
859 859

  
860 860
function session_auth($backing) {
861
	global $g, $debug, $HTTP_SERVER_VARS, $userindex, $config;
861
	global $g, $debug, $HTTP_SERVER_VARS, $userindex, $config, $_SESSION;
862 862

  
863 863
	session_start();
864 864

  
......
868 868
			$acct_expires = get_user_expiration_date($_POST['usernamefld']);
869 869
			if($acct_expires) {
870 870
				if (strtotime("-1 day") > strtotime(date("m/d/Y",strtotime($acct_expires)))) {
871
					echo "showajaxmessage('{$_SESSION['Login_Error']}');";
872
					return;
871
					log_error("Attempted login for invalid user '{$_POST['usernamefld']}' from: {$_SERVER['REMOTE_ADDR']}");
872
					if(isAjax()) {
873
						echo "showajaxmessage('{$_SESSION['Login_Error']}');";
874
						return;
875
					}
873 876
				}
874 877
			} else {
875 878
				if(is_account_disabled($_POST['usernamefld'])) {
876
					echo "showajaxmessage('{$_SESSION['Login_Error']}');";
879
					log_error("Attempted login for invalid user '{$_POST['usernamefld']}' from: {$_SERVER['REMOTE_ADDR']}");
880
					if(isAjax()) {
881
						echo "showajaxmessage('{$_SESSION['Login_Error']}');";
882
						return;
883
					}
877 884
				} else {
878 885
					$_SESSION['Logged_In'] = "True";
879 886
					$_SESSION['Username'] = $_POST['usernamefld'];

Also available in: Unified diff