login update
This commit is contained in:
parent
04372b3539
commit
5d0e60cd9d
|
@ -18,9 +18,19 @@ if(isset($_POST['login'])){
|
|||
$hashedPassword = $group->password->password;
|
||||
if(password_verify($password, $hashedPassword )){
|
||||
$_SESSION['groupName'] = $groupName;
|
||||
$_SESSION['groupId'] = $group->id;
|
||||
$_SESSION['success'] = "You are now logged in";
|
||||
header('location: ../Frontend/group.php?login=success');
|
||||
header('location: ../Frontend/index.php?login=success');
|
||||
}else{
|
||||
session_destroy();
|
||||
header('location: ../Frontend/index.php?login=failed?reason=password');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
session_destroy();
|
||||
header('location: ../Frontend/index.php?login=failed?reason=group');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ if(isset($_POST['reg_group'])){
|
|||
}
|
||||
|
||||
$_SESSION['groupName'] = $groupName;
|
||||
$_SESSION['groupId'] = $group->id;
|
||||
$_SESSION['success'] = "You are now logged in";
|
||||
header('location: index.php');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue