Parcourir la source

forgot to take out hardcoded username

causefx il y a 7 ans
Parent
commit
8a82381f97
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      api/functions/auth-functions.php

+ 2 - 2
api/functions/auth-functions.php

@@ -238,10 +238,10 @@ if (function_exists('ldap_connect')) {
 			try {
 				// If a successful connection is made to your server, the provider will be returned.
 				$provider = $ad->connect();
-				$user = $provider->search()->find('causefx');
+				$user = $provider->search()->find($username);
 				$bind = $user->exists;
 			} catch (\Adldap\Auth\BindException $e) {
-				prettyPrint($e->getMessage());
+				writeLog('error', 'LDAP Function - Error: ' . $e->getMessage(), $username);
 				// There was an issue binding / connecting to the server.
 			}
 			return ($bind) ? true : false;