Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Corrected some typos and mistakes

  • Loading branch information...
commit 7aaabae78e82e4e4fb68cd9177ee7a37930be04a 1 parent e0a53b4
authored September 09, 2005

Showing 1 changed file with 16 additions and 13 deletions. Show diff stats Hide diff stats

  1. 29  auth/ldap/lib.php
29  auth/ldap/lib.php
@@ -218,14 +218,14 @@ function auth_user_create ($userobject,$plainpass) {
218 218
 
219 219
     switch ($CFG->ldap_user_type)  {
220 220
         case 'edir':
221  
-    $newuser['objectClass']= array("inetOrgPerson","organizationalPerson","person","top");
222  
-    $newuser['uniqueId']= $userobject->username;
223  
-    $newuser['logindisabled']="TRUE";
224  
-    $newuser['userpassword']=$plainpass;
  221
+            $newuser['objectClass']= array("inetOrgPerson","organizationalPerson","person","top");
  222
+            $newuser['uniqueId']= $userobject->username;
  223
+            $newuser['logindisabled']="TRUE";
  224
+            $newuser['userpassword']=$plainpass;
  225
+            break;
225 226
         default:
226  
-           error('auth: ldap auth_user_create() does not support selected usertype (..yet)');
  227
+           error('auth: ldap auth_user_create() does not support selected usertype:"'.$CFG->ldap_user_type.'" (..yet)');
227 228
     }
228  
-        
229 229
     $uadd = ldap_add($ldapconnection, $CFG->ldap_user_attribute."=$userobject->username,".$CFG->ldap_create_context, $newuser);
230 230
 
231 231
     ldap_close($ldapconnection);
@@ -722,10 +722,11 @@ function auth_user_activate ($username) {
722 722
 
723 723
     $userdn = auth_ldap_find_userdn($ldapconnection, $username);
724 724
     switch ($CFG->ldap_user_type)  {
725  
-    case 'edir':
726  
-        $newinfo['loginDisabled']="FALSE";
727  
-    default:
728  
-        error ('auth: ldap auth_user_activate() does not support selected usertype (..yet)');    
  725
+        case 'edir':
  726
+            $newinfo['loginDisabled']="FALSE";
  727
+            break;
  728
+        default:
  729
+            error ('auth: ldap auth_user_activate() does not support selected usertype:"'.$CFG->ldap_user_type.'" (..yet)');    
729 730
     } 
730 731
     $result = ldap_modify($ldapconnection, $userdn, $newinfo);
731 732
     ldap_close($ldapconnection);
@@ -748,7 +749,8 @@ function auth_user_disable ($username) {
748 749
     $userdn = auth_ldap_find_userdn($ldapconnection, $username);
749 750
     switch ($CFG->ldap_user_type)  {
750 751
         case 'edir':
751  
-    $newinfo['loginDisabled']="TRUE";
  752
+            $newinfo['loginDisabled']="TRUE";
  753
+            break;
752 754
         default:
753 755
             error ('auth: ldap auth_user_disable() does not support selected usertype (..yet)');    
754 756
     }    
@@ -1283,7 +1285,8 @@ function auth_ldap_connect($binddn='',$bindpwd=''){
1283 1285
 
1284 1286
         if (!empty($binddn)){
1285 1287
             //bind with search-user
1286  
-            $bindresult=@ldap_bind($connresult, $binddn,$bindpwd);
  1288
+            //$debuginfo .= 'Using bind user'.$binddn.'and password:'.$bindpwd; 
  1289
+            $bindresult=ldap_bind($connresult, $binddn,$bindpwd);
1287 1290
         } else {
1288 1291
             //bind anonymously 
1289 1292
             $bindresult=@ldap_bind($connresult);
@@ -1297,7 +1300,7 @@ function auth_ldap_connect($binddn='',$bindpwd=''){
1297 1300
             return $connresult;
1298 1301
         }
1299 1302
         
1300  
-        $debuginfo = "<br/>Server: '$server' <br/> Connection: '$connresult'<br/> Bind result: '$bindresult'</br>";
  1303
+        $debuginfo .= "<br/>Server: '$server' <br/> Connection: '$connresult'<br/> Bind result: '$bindresult'</br>";
1301 1304
     }
1302 1305
 
1303 1306
     //If any of servers are alive we have already returned connection

0 notes on commit 7aaabae

Please sign in to comment.
Something went wrong with that request. Please try again.