diff options
Diffstat (limited to 'app/Api')
-rw-r--r-- | app/Api/Me.php | 4 | ||||
-rw-r--r-- | app/Api/User.php | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/app/Api/Me.php b/app/Api/Me.php index df8ec070..ccc809ed 100644 --- a/app/Api/Me.php +++ b/app/Api/Me.php @@ -38,6 +38,10 @@ class Me extends Base public function createMyPrivateProject($name, $description = null) { + if ($this->config->get('disable_private_project', 0) == 1) { + return false; + } + $values = array( 'name' => $name, 'description' => $description, diff --git a/app/Api/User.php b/app/Api/User.php index 9f26615d..48337ac6 100644 --- a/app/Api/User.php +++ b/app/Api/User.php @@ -36,6 +36,21 @@ class User extends \Kanboard\Core\Base return $this->user->remove($user_id); } + public function disableUser($user_id) + { + return $this->user->disable($user_id); + } + + public function enableUser($user_id) + { + return $this->user->enable($user_id); + } + + public function isActiveUser($user_id) + { + return $this->user->isActive($user_id); + } + public function createUser($username, $password, $name = '', $email = '', $role = Role::APP_USER) { $values = array( |