diff --git a/web/inc/classes/Model.class.php b/web/inc/classes/Model.class.php index 4582857..9024980 100644 --- a/web/inc/classes/Model.class.php +++ b/web/inc/classes/Model.class.php @@ -152,7 +152,7 @@ class Model { /** * @param array $data */ - public function validate($newgen=false) + private function validate($newgen=false) { if (!$this->dbFields) return true; @@ -169,7 +169,10 @@ class Model { if (isset($data[$key])) $value = $data[$key]; else + { + var_dump($key.' not set'); $value = null; + } if (is_array($value)) continue; diff --git a/web/models/User.model.php b/web/models/User.model.php index ff26988..6deb32c 100644 --- a/web/models/User.model.php +++ b/web/models/User.model.php @@ -30,12 +30,12 @@ class User extends Model { $_SESSION['user'] = $this; $_SESSION['userid'] = $this->id; - $_SESSION['user']->validate(); + + + $_SESSION['user']->save(); var_dump($_SESSION['user']); exit(); - - $_SESSION['user']->save(); } function logout()