From 01e8a6e0896ce1916a8492e1a1219c09da10c700 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 23 Aug 2018 16:40:29 -0500 Subject: [PATCH] Fix ldap fetching user_id as string (#9067) --- LibreNMS/Authentication/LdapAuthorizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibreNMS/Authentication/LdapAuthorizer.php b/LibreNMS/Authentication/LdapAuthorizer.php index 95ca7c833a..3d6ca3c2c3 100644 --- a/LibreNMS/Authentication/LdapAuthorizer.php +++ b/LibreNMS/Authentication/LdapAuthorizer.php @@ -358,7 +358,7 @@ class LdapAuthorizer extends AuthorizerBase return [ 'username' => $entry['uid'][0], 'realname' => $entry['cn'][0], - 'user_id' => $entry[$uid_attr][0], + 'user_id' => (int)$entry[$uid_attr][0], 'email' => $entry[Config::get('auth_ldap_emailattr', 'mail')][0], 'level' => $this->getUserlevel($entry['uid'][0]), ];