@@ -96,7 +96,7 @@ function authenticate($login, $password)
9696
9797 $ lc = ldap_connect ($ this ->params ['server ' ]);
9898
99- if (isTrue (AUTH_DEBUG )) {
99+ if (isTrue (' AUTH_DEBUG ' )) {
100100 echo '<br /> ' ;
101101 echo '$lc= ' ; var_dump ($ lc ); echo '<br /> ' ;
102102 echo 'ldap_error()= ' ; echo ldap_error ($ lc ); echo '<br /> ' ;
@@ -106,7 +106,7 @@ function authenticate($login, $password)
106106
107107 ldap_set_option ($ lc , LDAP_OPT_PROTOCOL_VERSION , 3 );
108108 ldap_set_option ($ lc , LDAP_OPT_REFERRALS , 0 );
109- if (isTrue (AUTH_DEBUG )) {
109+ if (isTrue (' AUTH_DEBUG ' )) {
110110 ldap_set_option ($ lc , LDAP_OPT_DEBUG_LEVEL , 7 );
111111 }
112112
@@ -119,13 +119,13 @@ function authenticate($login, $password)
119119 $ login .= '@ ' . $ this ->params ['default_domain ' ];
120120 }
121121
122- if (isTrue (AUTH_DEBUG )) {
122+ if (isTrue (' AUTH_DEBUG ' )) {
123123 echo '$login= ' ; var_dump ($ login ); echo '<br /> ' ;
124124 }
125125
126126 $ lb = @ldap_bind ($ lc , $ login , $ password );
127127
128- if (isTrue (AUTH_DEBUG )) {
128+ if (isTrue (' AUTH_DEBUG ' )) {
129129 echo '$lb= ' ; var_dump ($ lb ); echo '<br /> ' ;
130130 echo 'ldap_error()= ' ; echo ldap_error ($ lc ); echo '<br /> ' ;
131131 }
@@ -142,7 +142,7 @@ function authenticate($login, $password)
142142 $ fields = array ('memberof ' );
143143 $ sr = @ldap_search ($ lc , $ this ->params ['base_dn ' ], $ filter , $ fields );
144144
145- if (isTrue (AUTH_DEBUG )) {
145+ if (isTrue (' AUTH_DEBUG ' )) {
146146 echo '$sr= ' ; var_dump ($ sr ); echo '<br /> ' ;
147147 echo 'ldap_error()= ' ; echo ldap_error ($ lc ); echo '<br /> ' ;
148148 }
@@ -154,7 +154,7 @@ function authenticate($login, $password)
154154
155155 $ entries = @ldap_get_entries ($ lc , $ sr );
156156
157- if (isTrue (AUTH_DEBUG )) {
157+ if (isTrue (' AUTH_DEBUG ' )) {
158158 echo '$entries= ' ; var_dump ($ entries ); echo '<br /> ' ;
159159 echo 'ldap_error()= ' ; echo ldap_error ($ lc ); echo '<br /> ' ;
160160 }
@@ -173,7 +173,7 @@ function authenticate($login, $password)
173173 $ groups [] = substr ($ grp_fields [0 ], 3 );
174174 }
175175
176- if (isTrue (AUTH_DEBUG )) {
176+ if (isTrue (' AUTH_DEBUG ' )) {
177177 echo '$member_of ' ; var_dump ($ member_of ); echo '<br /> ' ;
178178 };
179179
@@ -195,7 +195,7 @@ function authenticate($login, $password)
195195 // Assuming OpenLDAP server.
196196 $ login_oldap = 'uid= ' .$ login .', ' .$ this ->params ['base_dn ' ];
197197
198- if (isTrue (AUTH_DEBUG )) {
198+ if (isTrue (' AUTH_DEBUG ' )) {
199199 echo '$login_oldap= ' ; var_dump ($ login_oldap ); echo '<br /> ' ;
200200 }
201201
@@ -207,7 +207,7 @@ function authenticate($login, $password)
207207
208208 $ lb = @ldap_bind ($ lc , $ login_oldap , $ password );
209209
210- if (isTrue (AUTH_DEBUG )) {
210+ if (isTrue (' AUTH_DEBUG ' )) {
211211 echo '$lb= ' ; var_dump ($ lb ); echo '<br /> ' ;
212212 echo 'ldap_error()= ' ; echo ldap_error ($ lc ); echo '<br /> ' ;
213213 }
@@ -225,7 +225,7 @@ function authenticate($login, $password)
225225 $ fields = array ('samaccountname ' , 'mail ' , 'memberof ' , 'department ' , 'displayname ' , 'telephonenumber ' , 'primarygroupid ' );
226226 $ sr = @ldap_search ($ lc , $ this ->params ['base_dn ' ], $ filter , $ fields );
227227
228- if (isTrue (AUTH_DEBUG )) {
228+ if (isTrue (' AUTH_DEBUG ' )) {
229229 echo '$sr= ' ; var_dump ($ sr ); echo '<br /> ' ;
230230 echo 'ldap_error()= ' ; echo ldap_error ($ lc ); echo '<br /> ' ;
231231 }
@@ -238,7 +238,7 @@ function authenticate($login, $password)
238238
239239 $ entries = @ldap_get_entries ($ lc , $ sr );
240240
241- if (isTrue (AUTH_DEBUG )) {
241+ if (isTrue (' AUTH_DEBUG ' )) {
242242 echo '$entries= ' ; var_dump ($ entries ); echo '<br /> ' ;
243243 echo 'ldap_error()= ' ; echo ldap_error ($ lc ); echo '<br /> ' ;
244244 }
@@ -258,7 +258,7 @@ function authenticate($login, $password)
258258 $ groups [] = substr ($ grp_fields [0 ], 3 );
259259 }
260260
261- if (isTrue (AUTH_DEBUG )) {
261+ if (isTrue (' AUTH_DEBUG ' )) {
262262 echo '$member_of ' ; var_dump ($ member_of ); echo '<br /> ' ;
263263 }
264264
0 commit comments