diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-13 10:49:46 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-13 10:49:46 -0400 |
commit | 90598c8e55553ba4b03b16fe4cccab637de47e6a (patch) | |
tree | 40e815908320d61df9ac7088140b32325d0475e3 /app | |
parent | cbb8fbe2dd2b2f1d5c9ead0228e2b7485ca7e417 (diff) |
Add log message for API procedure createLdapUser()
Diffstat (limited to 'app')
-rw-r--r-- | app/Api/User.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Api/User.php b/app/Api/User.php index 21feb4fa..9b8081d6 100644 --- a/app/Api/User.php +++ b/app/Api/User.php @@ -66,8 +66,24 @@ class User extends \Kanboard\Core\Base return $valid ? $this->user->create($values) : false; } + /** + * Create LDAP user in the database + * + * Only "anonymous" and "proxy" LDAP authentication are supported by this method + * + * User information will be fetched from the LDAP server + * + * @access public + * @param string $username + * @return bool|int + */ public function createLdapUser($username) { + if (LDAP_BIND_TYPE === 'user') { + $this->logger->error('LDAP authentication "user" is not supported by this API call'); + return false; + } + try { $ldap = LdapClient::connect(); |