diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php index cde35241cb624a07b5ce1e0acc950fbabe36de4e..d8c39b8d2aa42e1d8fcc391e71c27eaad6139182 100644 --- a/app/Controllers/UserController.php +++ b/app/Controllers/UserController.php @@ -31,5 +31,9 @@ class UserController { return $this->userModel->getAllUsers(); } + public function registerUser($name, $username, $email, $password, $isAdmin) { + return $this->createUser($name, $username, $email, password_hash($password,PASSWORD_DEFAULT), $isAdmin); + } + } ?>