forked from root/threadr.lostcave.ddnss.de
added session variables
parent
16e1fd7b5d
commit
9dff324911
|
@ -13,7 +13,8 @@ if ($statement->rowCount() > 0) {
|
||||||
//chechk for correct password
|
//chechk for correct password
|
||||||
if ($dbentry['authentication_string'] == hash($dbentry['authentication_algorithm'], $password . $dbentry['authentication_salt'])) {
|
if ($dbentry['authentication_string'] == hash($dbentry['authentication_algorithm'], $password . $dbentry['authentication_salt'])) {
|
||||||
//password correct
|
//password correct
|
||||||
echo 1;
|
$_SESSION['user_id'] = $dbentry['id'];
|
||||||
|
$_SESSION['user_ip'] = $_SERVER['REMOTE_ADDR']; //ip will be used to prevent session stealing
|
||||||
} else {
|
} else {
|
||||||
//password inorrect
|
//password inorrect
|
||||||
header("Location: https://lostcave.ddnss.de/common/threadr/login?error=credentials");
|
header("Location: https://lostcave.ddnss.de/common/threadr/login?error=credentials");
|
||||||
|
|
Loading…
Reference in New Issue