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;