now
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
Chris 2023-10-30 23:30:23 +01:00
parent 9c1fd320f7
commit 8508f42216
2 changed files with 7 additions and 4 deletions

View File

@ -152,7 +152,7 @@ class Model {
/** /**
* @param array $data * @param array $data
*/ */
public function validate($newgen=false) private function validate($newgen=false)
{ {
if (!$this->dbFields) if (!$this->dbFields)
return true; return true;
@ -169,7 +169,10 @@ class Model {
if (isset($data[$key])) if (isset($data[$key]))
$value = $data[$key]; $value = $data[$key];
else else
{
var_dump($key.' not set');
$value = null; $value = null;
}
if (is_array($value)) if (is_array($value))
continue; continue;

View File

@ -30,12 +30,12 @@ class User extends Model {
$_SESSION['user'] = $this; $_SESSION['user'] = $this;
$_SESSION['userid'] = $this->id; $_SESSION['userid'] = $this->id;
$_SESSION['user']->validate();
$_SESSION['user']->save();
var_dump($_SESSION['user']); var_dump($_SESSION['user']);
exit(); exit();
$_SESSION['user']->save();
} }
function logout() function logout()