mirror of
https://github.com/twisterarmy/cloud-server.git
synced 2025-03-12 21:41:09 +00:00
fix session init
This commit is contained in:
parent
df95800444
commit
8ea31e92cb
@ -65,14 +65,17 @@ if (isset($_POST) && $_POST) {
|
||||
|
||||
if ($_twister->importWallet($userName, $userPrivateKey)) {
|
||||
|
||||
// @TODO
|
||||
// @TODO: add login time
|
||||
|
||||
// Auth
|
||||
if (!session_id()) {
|
||||
|
||||
$_SESSION['username'] = $userName;
|
||||
if (session_id()) {
|
||||
session_destroy();
|
||||
}
|
||||
|
||||
session_start();
|
||||
|
||||
$_SESSION['username'] = $userName;
|
||||
|
||||
// Redirect
|
||||
header('Location: ' . PROJECT_HOST, true, 302);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user