Location: PHPKode > projects > Exero CMS > upload/modules/community/login.php
<?
// Login Script
if(!$ecms->permissions("community","login")) {
	include("themes/$ecms->theme/nopermission.php");
	exit;
}

if(empty($_POST['action'])) {
	include("themes/$ecms->theme/login.php");
} else if(isset($_POST['username']) && isset($_POST['password'])) {
	$login = $user->login($_POST['username'],$_POST['password'],$_POST['rememberme']);
	if($login) {
		($hook = $ecms->fetch_hook("login_success")) ? eval($hook) : false;
		$message = "You are now logged in.";
		$module = "rooturl";
		include("themes/$ecms->theme/redirect.php");
	} else {
		$message = "Invalid Username or Password.";
		include("themes/$ecms->theme/login.php");
	}
}
?>
Return current item: Exero CMS