From d7f3313ff4514e38c9f53439cd1a1287e56e45f7 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 11 Nov 2018 17:19:26 +0100 Subject: reboot folder --- w/class/user.php | 58 -------------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 w/class/user.php (limited to 'w/class/user.php') diff --git a/w/class/user.php b/w/class/user.php deleted file mode 100644 index 77d6ba2..0000000 --- a/w/class/user.php +++ /dev/null @@ -1,58 +0,0 @@ -hydrate($datas); - } - } - - public function hydrate(array $datas = []) - { - foreach ($datas as $key => $value) { - $method = 'set' . $key; - - if (method_exists($this, $method)) { - $this->$method($value); - } - } - } - - public function setlevel($level) - { - $this->level = $level; - } - - public function level() - { - return $this->level; - } - - public function isvisitor() - { - return $this->level === Modeluser::FREE; - } - - public function canedit() - { - // a modifier en prenant compte du code invitation de l'article - return $this->level >= Modeluser::EDITOR; - } - - public function cancreate() - { - return $this->level >=Modeluser::EDITOR; - } - - public function isadmin() - { - return $this->level === Modeluser::ADMIN; - } -} - - - -?> \ No newline at end of file -- cgit v1.2.3