From 04c75838f636ed579966bd2c7fdf5095aa69c026 Mon Sep 17 00:00:00 2001 From: Peter Lamperud Date: Mon, 16 Nov 2015 13:37:12 +0100 Subject: [PATCH] Functionality added: adduser(), user_exists_in_db() --- .../authentication/active_directory.inc.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/html/includes/authentication/active_directory.inc.php b/html/includes/authentication/active_directory.inc.php index e2d85907f..d4f2ef331 100644 --- a/html/includes/authentication/active_directory.inc.php +++ b/html/includes/authentication/active_directory.inc.php @@ -1,7 +1,6 @@ $username, 'user_id' => get_userid($username), 'level' => "0", 'can_modify_passwd' => 0, 'twofactor' => 0), 'users'); + } + else { + return false; + } } +function user_exists_in_db($username) { + $return = @dbFetchCell('SELECT COUNT(*) FROM users WHERE username = ?', array($username), true); + return $return; +} function user_exists($username) { global $config, $ds;