diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-12-23 18:20:57 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-12-23 18:20:57 +0100 |
commit | e8566a57cf1b9cc2eed10429f27840d17da945ef (patch) | |
tree | 9902d9f4dc2e871819af21ede642e50aaab1518b /app/class/controlleruser.php | |
parent | 532cdf4bb82ab7cc6fa7659d9aec3ce122b2ec52 (diff) | |
download | wcms-e8566a57cf1b9cc2eed10429f27840d17da945ef.tar.gz wcms-e8566a57cf1b9cc2eed10429f27840d17da945ef.zip |
feature users
Diffstat (limited to 'app/class/controlleruser.php')
-rw-r--r-- | app/class/controlleruser.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app/class/controlleruser.php b/app/class/controlleruser.php new file mode 100644 index 0000000..78dd6c1 --- /dev/null +++ b/app/class/controlleruser.php @@ -0,0 +1,33 @@ +<?php + +class Controlleruser extends Controller +{ + + public function __construct($render) { + parent::__construct($render); + } + + public function desktop() + { + if($this->user->isadmin()) { + $userlist = $this->usermanager->getlister(); + $this->showtemplate('user', ['userlist' => $userlist]); + } else { + $this->routedirect('home'); + } + } + + public function add() + { + if(isset($_POST['id'])) { + $user = new User($_POST); + if(!$this->usermanager->get($user)) { + $this->usermanager->add($user); + } + } + } +} + + + +?>
\ No newline at end of file |