inc/auth.inc.php
changeset 126 cb06e3e29ed8
parent 119 f74e4f88b680
child 136 c795dd75a77e
equal deleted inserted replaced
125:700a3674b72e 126:cb06e3e29ed8
    51 		if($result->numRows() == 1)
    51 		if($result->numRows() == 1)
    52 		{
    52 		{
    53 			$rowObj = $result->fetchRow();
    53 			$rowObj = $result->fetchRow();
    54 			$_SESSION["userid"] = $rowObj["id"];
    54 			$_SESSION["userid"] = $rowObj["id"];
    55 			$_SESSION["name"] = $rowObj["fullname"];
    55 			$_SESSION["name"] = $rowObj["fullname"];
    56 			if($_POST["authenticate"])
    56 			if(isset($_POST["authenticate"]))
    57 			{
    57 			{
    58 				//If a user has just authenticated, redirect him to index with timestamp, so post-data gets lost.
    58 				//If a user has just authenticated, redirect him to index with timestamp, so post-data gets lost.
    59 				session_write_close();
    59 				session_write_close();
    60 				clean_page("index.php");
    60 				clean_page("index.php");
    61 				exit;
    61 				exit;