auto login when chosen so
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
This commit is contained in:
parent
35c496b187
commit
fea847afd2
21
.vscode/launch.json
vendored
Normal file
21
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch built-in server",
|
||||
"type": "php",
|
||||
"request": "launch",
|
||||
"runtimeArgs": [
|
||||
"-S",
|
||||
"localhost:8080",
|
||||
"-t",
|
||||
"web"
|
||||
],
|
||||
"hostname": "localhost",
|
||||
"port": 5902,
|
||||
"serverReadyAction": {
|
||||
"action": "openExternally"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
@ -22,6 +22,8 @@ class Dog extends Model
|
||||
|
||||
if (!$this->exists($dog))
|
||||
return false;
|
||||
else if(!is_array($_SESSION['user']->data['dogs']))
|
||||
return false;
|
||||
else {
|
||||
if (in_array($dog, $_SESSION['user']->data['dogs']))
|
||||
return true;
|
||||
|
@ -8,7 +8,6 @@ class Tournament extends Model
|
||||
'name' => ['type' => 'text', 'required'],
|
||||
'date' => ['type' => 'datetime','required'],
|
||||
'duration' => ['type' => 'int'], //in days
|
||||
'referee' => ['type' => 'text'],
|
||||
'text' => ['type' => 'text'],
|
||||
'url' => ['type' => 'text'], //if there is one
|
||||
'logo' => ['type' => 'text', 'default' => 'https://pictshare.net/prrnrk.jpg'],
|
||||
|
@ -27,8 +27,15 @@ class Err extends Page {
|
||||
|
||||
if($u->id)
|
||||
{
|
||||
$u->load($u->id);
|
||||
$u->login();
|
||||
$this->redirect($_SERVER['REQUEST_URI']);
|
||||
$url = '/'.implode('/',$GLOBALS['url']);
|
||||
//var_dump($url);
|
||||
$this->redirect($url);
|
||||
}
|
||||
else
|
||||
{
|
||||
setcookie('token', '', time() - 3600, "/");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user