From f971d7ecf351cb9425c9d19f67f8d79cc77a6338 Mon Sep 17 00:00:00 2001 From: Peter Lamperud Date: Mon, 16 Nov 2015 12:27:15 +0100 Subject: [PATCH 1/6] Signed-off-by: Peter Lamperud --- html/includes/authentication/active_directory.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/html/includes/authentication/active_directory.inc.php b/html/includes/authentication/active_directory.inc.php index a562ae9010..e2d85907f1 100644 --- a/html/includes/authentication/active_directory.inc.php +++ b/html/includes/authentication/active_directory.inc.php @@ -1,6 +1,7 @@ Date: Mon, 16 Nov 2015 13:37:12 +0100 Subject: [PATCH 2/6] 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 e2d85907f1..d4f2ef3319 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; From 6e78fc8d0b7f846e1371112bb198773b5f3ab624 Mon Sep 17 00:00:00 2001 From: vizay Date: Tue, 17 Nov 2015 12:28:28 +0100 Subject: [PATCH 3/6] Update active_directory.inc.php --- html/includes/authentication/active_directory.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/authentication/active_directory.inc.php b/html/includes/authentication/active_directory.inc.php index d4f2ef3319..a1dd80f86a 100644 --- a/html/includes/authentication/active_directory.inc.php +++ b/html/includes/authentication/active_directory.inc.php @@ -94,7 +94,7 @@ function adduser($username) { } function user_exists_in_db($username) { - $return = @dbFetchCell('SELECT COUNT(*) FROM users WHERE username = ?', array($username), true); + $return = dbFetchCell('SELECT COUNT(*) FROM users WHERE username = ?', array($username), true); return $return; } From f7ad46ef1c2482d16ca278f8447361513fb09bb2 Mon Sep 17 00:00:00 2001 From: vizay Date: Tue, 17 Nov 2015 12:33:17 +0100 Subject: [PATCH 4/6] Update AUTHORS.md --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 4c3d6983bf..0b495e5b1a 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -69,4 +69,5 @@ Contributors to LibreNMS: - Rob Gormley (rgormley) - Richard Kojedzinszky (rkojedzinszky) - Tony Murray (murrant) +- Peter Lamperud (vizay) [1]: http://observium.org/ "Observium web site" From 139e6f1aef84d7a5479bed43e063067e46982cea Mon Sep 17 00:00:00 2001 From: vizay Date: Tue, 17 Nov 2015 12:33:58 +0100 Subject: [PATCH 5/6] Update AUTHORS.md --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 0b495e5b1a..72c7354353 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -69,5 +69,5 @@ Contributors to LibreNMS: - Rob Gormley (rgormley) - Richard Kojedzinszky (rkojedzinszky) - Tony Murray (murrant) -- Peter Lamperud (vizay) +- Peter Lamperud (vizay) [1]: http://observium.org/ "Observium web site" From f9c69419f425151ce6ae8ca63eef7f050ddb1b0c Mon Sep 17 00:00:00 2001 From: vizay Date: Tue, 17 Nov 2015 12:35:36 +0100 Subject: [PATCH 6/6] I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 72c7354353..0b495e5b1a 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -69,5 +69,5 @@ Contributors to LibreNMS: - Rob Gormley (rgormley) - Richard Kojedzinszky (rkojedzinszky) - Tony Murray (murrant) -- Peter Lamperud (vizay) +- Peter Lamperud (vizay) [1]: http://observium.org/ "Observium web site"