Completed
Push — development ( 5afdf5...813154 )
by Nils
07:21
created
includes/language/chinese_kb.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //CHINESE
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else {
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //CHINESE
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else{
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
includes/language/polish.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -879,7 +879,8 @@  discard block
 block discarded – undo
879 879
     'error_url_missing' => 'Nie podano adresu URL!',
880 880
     'error_ssh_credentials_missing' => 'Poświadczenia SSH są niepoprawne.',
881 881
     'error_url_must_be_ssh' => 'URL musi zawierać protokół SSH!',
882
-    'auto_update_server_password_info' => 'Kliknięcie start, automatycznie wykona poniższe kroki: < ul > <li > Połączenie przez SSH do serwera wykorzystując dane logowania i pole `URL`, < / li > <li > Zmiana hasła użytkownika na serwerze < /il > <li > Zachowanie nowego hasła w Teampass < /il > <li > Zakończenie połączenia SSH < /li > < / ul > <br / > < b > Upewnij się, że użytkownik posiada prawa do zalogowania się i zmiany hasła na serwerze(jeśli nie, określ hasło użytkownika root) przed uruchomieniem.< / b > ',
882
+    'auto_update_server_password_info' => 'Kliknięcie start, automatycznie wykona poniższe kroki: < ul > <li > Połączenie przez SSH do {
883
+    serwera wykorzystując dane logowania i pole `URL`, < / li > <li > Zmiana hasła użytkownika na serwerze < /il > <li > Zachowanie nowego hasła w Teampass < /il > <li > Zakończenie połączenia SSH < /li > < / ul > <br / > < b > Upewnij się, że użytkownik posiada prawa do zalogowania się i zmiany hasła na serwerze(jeśli nie, określ hasło użytkownika root) przed uruchomieniem.< / b > ',
883 884
     'update_server_password' => 'Zaktualizuj hasło serwera',
884 885
     'error_personal_sk_expected' => 'Musisz najpierw wprowadzić swój prywatny saltkety!',
885 886
     'click_to_generate' => 'Kliknij by wygenerować',
@@ -1048,3 +1049,4 @@  discard block
 block discarded – undo
1048 1049
     '' => ''
1049 1050
 );
1050 1051
 }
1052
+}
Please login to merge, or discard this patch.
includes/language/swedish_kb.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //SWEDISH
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else {
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //SWEDISH
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else{
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
includes/language/italian_kb.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //ITALIAN
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else {
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //ITALIAN
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else{
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
includes/language/spanish_admin_help.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //SPANISH
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else {
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //SPANISH
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else{
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
includes/language/dutch_kb.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //DUTCH
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else {
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 //DUTCH
3 3
 if (!isset($_SESSION['settings']['cpassman_url'])) {
4 4
     $TeamPass_url = '';
5
-}else{
5
+} else{
6 6
     $TeamPass_url = $_SESSION['settings']['cpassman_url'];
7 7
 }
8 8
 
Please login to merge, or discard this patch.
includes/libraries/LDAP/adLDAP/adLDAP.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -755,11 +755,11 @@  discard block
 block discarded – undo
755 755
     }
756 756
 
757 757
     /**
758
-    * Returns objectClass in an array
759
-    *
760
-    * @param string $distinguishedName The full DN of a contact
761
-    * @return array
762
-    */
758
+     * Returns objectClass in an array
759
+     *
760
+     * @param string $distinguishedName The full DN of a contact
761
+     * @return array
762
+     */
763 763
     public function getObjectClass($distinguishedName) {
764 764
         if ($distinguishedName === NULL) { return false; }
765 765
         if (!$this->getLdapBind()) { return false; }
@@ -778,21 +778,21 @@  discard block
 block discarded – undo
778 778
     }
779 779
 
780 780
     /**
781
-    * Find the Base DN of your domain controller
782
-    * 
783
-    * @return string
784
-    */
781
+     * Find the Base DN of your domain controller
782
+     * 
783
+     * @return string
784
+     */
785 785
     public function findBaseDn() {
786 786
         $namingContext = $this->getRootDse(array('defaultnamingcontext'));   
787 787
         return $namingContext[0]['defaultnamingcontext'][0];
788 788
     }
789 789
     
790 790
     /**
791
-    * Get the RootDSE properties from a domain controller
792
-    * 
793
-    * @param string[] $attributes The attributes you wish to query e.g. defaultnamingcontext
794
-    * @return array
795
-    */
791
+     * Get the RootDSE properties from a domain controller
792
+     * 
793
+     * @param string[] $attributes The attributes you wish to query e.g. defaultnamingcontext
794
+     * @return array
795
+     */
796 796
     public function getRootDse($attributes = array("*", "+")) {
797 797
         if (!$this->ldapBind) { return (false); }
798 798
         
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -480,7 +480,7 @@
 block discarded – undo
480 480
     public function setUseSSL($useSSL) {
481 481
             $this->useSSL = $useSSL;
482 482
             // Set the default port correctly 
483
-            if($this->useSSL) { 
483
+            if ($this->useSSL) { 
484 484
             $this->setPort(self::ADLDAP_LDAPS_PORT); 
485 485
             }
486 486
             else { 
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -482,8 +482,7 @@  discard block
 block discarded – undo
482 482
             // Set the default port correctly 
483 483
             if($this->useSSL) { 
484 484
             $this->setPort(self::ADLDAP_LDAPS_PORT); 
485
-            }
486
-            else { 
485
+            } else { 
487 486
             $this->setPort(self::ADLDAP_LDAP_PORT); 
488 487
             } 
489 488
     }
@@ -641,8 +640,7 @@  discard block
 block discarded – undo
641 640
                 if ($this->useSSL && !$this->useTLS) {
642 641
                     // If you have problems troubleshooting, remove the @ character from the ldapldapBind command above to get the actual error message
643 642
                     throw new adLDAPException('Bind to Active Directory failed. Either the LDAPs connection failed or the login credentials are incorrect. AD said: '.$this->getLastError());
644
-                }
645
-                else {
643
+                } else {
646 644
                     throw new adLDAPException('Bind to Active Directory failed. Check the login credentials and/or server details. AD said: '.$this->getLastError());
647 645
                 }
648 646
             }
@@ -652,8 +650,7 @@  discard block
 block discarded – undo
652 650
             $this->ldapBind = @ldap_sasl_bind($this->ldapConnection, NULL, NULL, "GSSAPI"); 
653 651
             if (!$this->ldapBind) { 
654 652
                 throw new adLDAPException('Rebind to Active Directory failed. AD said: '.$this->getLastError()); 
655
-            } 
656
-            else {
653
+            } else {
657 654
                 return true;
658 655
             }
659 656
         }
@@ -694,8 +691,7 @@  discard block
 block discarded – undo
694 691
             $this->ldapBind = @ldap_sasl_bind($this->ldapConnection, NULL, NULL, "GSSAPI");
695 692
             if (!$this->ldapBind) {
696 693
                 throw new adLDAPException('Rebind to Active Directory failed. AD said: '.$this->getLastError());
697
-            }
698
-            else {
694
+            } else {
699 695
                 return true;
700 696
             }
701 697
         }
Please login to merge, or discard this patch.
includes/libraries/LDAP/adLDAP/classes/adLDAPUsers.php 3 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -54,25 +54,25 @@  discard block
 block discarded – undo
54 54
     }
55 55
     
56 56
     /**
57
-    * Validate a user's login credentials
58
-    * 
59
-    * @param string $username A user's AD username
60
-    * @param string $password A user's AD password
61
-    * @param bool optional $prevent_rebind
62
-    * @return bool
63
-    */
57
+     * Validate a user's login credentials
58
+     * 
59
+     * @param string $username A user's AD username
60
+     * @param string $password A user's AD password
61
+     * @param bool optional $prevent_rebind
62
+     * @return bool
63
+     */
64 64
     public function authenticate($username, $password, $preventRebind = false) {
65 65
         return $this->adldap->authenticate($username, $password, $preventRebind);
66 66
     }
67 67
     
68 68
     /**
69
-    * Create a user
70
-    * 
71
-    * If you specify a password here, this can only be performed over SSL
72
-    * 
73
-    * @param array $attributes The attributes to set to the user account
74
-    * @return string|boolean
75
-    */
69
+     * Create a user
70
+     * 
71
+     * If you specify a password here, this can only be performed over SSL
72
+     * 
73
+     * @param array $attributes The attributes to set to the user account
74
+     * @return string|boolean
75
+     */
76 76
     public function create($attributes) {
77 77
         // Check for compulsory fields
78 78
         if (!array_key_exists("username", $attributes)) { return "Missing compulsory field [username]"; }
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
     }
123 123
     
124 124
     /**
125
-    * Account control options
126
-    *
127
-    * @param string[] $options The options to convert to int 
128
-    * @return int
129
-    */
125
+     * Account control options
126
+     *
127
+     * @param string[] $options The options to convert to int 
128
+     * @return int
129
+     */
130 130
     protected function accountControl($options) {
131 131
         $val = 0;
132 132
 
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
     }
159 159
     
160 160
     /**
161
-    * Delete a user account
162
-    * 
163
-    * @param string $username The username to delete (please be careful here!)
164
-    * @param bool $isGUID Is the username a GUID or a samAccountName
165
-    * @return boolean
166
-    */
161
+     * Delete a user account
162
+     * 
163
+     * @param string $username The username to delete (please be careful here!)
164
+     * @param bool $isGUID Is the username a GUID or a samAccountName
165
+     * @return boolean
166
+     */
167 167
     public function delete($username, $isGUID = false) {      
168 168
         $userinfo = $this->info($username, array("*"), $isGUID);
169 169
         $dn = $userinfo[0]['distinguishedname'][0];
@@ -370,13 +370,13 @@  discard block
 block discarded – undo
370 370
     }
371 371
     
372 372
     /**
373
-    * Modify a user
374
-    * 
375
-    * @param string $username The username to query
376
-    * @param array $attributes The attributes to modify.  Note if you set the enabled attribute you must not specify any other attributes
377
-    * @param bool $isGUID Is the username passed a GUID or a samAccountName
378
-    * @return string|boolean
379
-    */
373
+     * Modify a user
374
+     * 
375
+     * @param string $username The username to query
376
+     * @param array $attributes The attributes to modify.  Note if you set the enabled attribute you must not specify any other attributes
377
+     * @param bool $isGUID Is the username passed a GUID or a samAccountName
378
+     * @return string|boolean
379
+     */
380 380
     public function modify($username, $attributes, $isGUID = false) {
381 381
         if ($username === NULL) { return "Missing compulsory field [username]"; }
382 382
         if (array_key_exists("password", $attributes) && !$this->adldap->getUseSSL() && !$this->adldap->getUseTLS()) { 
@@ -416,12 +416,12 @@  discard block
 block discarded – undo
416 416
     }
417 417
     
418 418
     /**
419
-    * Disable a user account
420
-    * 
421
-    * @param string $username The username to disable
422
-    * @param bool $isGUID Is the username passed a GUID or a samAccountName
423
-    * @return string|boolean
424
-    */
419
+     * Disable a user account
420
+     * 
421
+     * @param string $username The username to disable
422
+     * @param bool $isGUID Is the username passed a GUID or a samAccountName
423
+     * @return string|boolean
424
+     */
425 425
     public function disable($username, $isGUID = false) {
426 426
         if ($username === NULL) { return "Missing compulsory field [username]"; }
427 427
         $attributes = array("enabled" => 0);
@@ -432,12 +432,12 @@  discard block
 block discarded – undo
432 432
     }
433 433
     
434 434
     /**
435
-    * Enable a user account
436
-    * 
437
-    * @param string $username The username to enable
438
-    * @param bool $isGUID Is the username passed a GUID or a samAccountName
439
-    * @return string|boolean
440
-    */
435
+     * Enable a user account
436
+     * 
437
+     * @param string $username The username to enable
438
+     * @param bool $isGUID Is the username passed a GUID or a samAccountName
439
+     * @return string|boolean
440
+     */
441 441
     public function enable($username, $isGUID = false) {
442 442
         if ($username === NULL) { return "Missing compulsory field [username]"; }
443 443
         $attributes = array("enabled" => 1);
@@ -605,19 +605,19 @@  discard block
 block discarded – undo
605 605
             }
606 606
         }
607 607
         if ($sorted) { 
608
-          asort($usersArray); 
608
+            asort($usersArray); 
609 609
         }
610 610
         return ($usersArray);
611 611
     }
612 612
     
613 613
     /**
614
-    * Move a user account to a different OU
615
-    *
616
-    * @param string $username The username to move (please be careful here!)
617
-    * @param array $container The container or containers to move the user to (please be careful here!).
618
-    * accepts containers in 1. parent 2. child order
619
-    * @return string|boolean
620
-    */
614
+     * Move a user account to a different OU
615
+     *
616
+     * @param string $username The username to move (please be careful here!)
617
+     * @param array $container The container or containers to move the user to (please be careful here!).
618
+     * accepts containers in 1. parent 2. child order
619
+     * @return string|boolean
620
+     */
621 621
     public function move($username, $container) {
622 622
         if (!$this->adldap->getLdapBind()) { return false; }
623 623
         if ($username === null) { return "Missing compulsory field [username]"; }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -214,17 +214,17 @@  discard block
 block discarded – undo
214 214
 
215 215
         if ($isGUID === true) {
216 216
             $username = $this->adldap->utilities()->strGuidToHex($username);
217
-            $filter = "objectguid=" . $username;
217
+            $filter = "objectguid=".$username;
218 218
         }
219 219
         else if (strpos($username, "@")) {
220
-                $filter = "userPrincipalName=" . $username;
220
+                $filter = "userPrincipalName=".$username;
221 221
         }
222 222
         else {
223
-                $filter = "samaccountname=" . $username;
223
+                $filter = "samaccountname=".$username;
224 224
         }
225 225
         $filter = "(&(objectCategory=person)({$filter}))";
226 226
         if ($fields === NULL) { 
227
-            $fields = array("samaccountname","mail","memberof","department","displayname","telephonenumber","primarygroupid","objectsid"); 
227
+            $fields = array("samaccountname", "mail", "memberof", "department", "displayname", "telephonenumber", "primarygroupid", "objectsid"); 
228 228
         }
229 229
         if (!in_array("objectsid", $fields)) {
230 230
             $fields[] = "objectsid";
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
      * @param bool $isGUID Is the username passed a GUID or a samAccountName
509 509
      * @return string
510 510
      */
511
-    public function dn($username, $isGUID=false) {
511
+    public function dn($username, $isGUID = false) {
512 512
         $user = $this->info($username, array("cn"), $isGUID);
513 513
         if ($user[0]["dn"] === NULL) { 
514 514
             return false; 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -215,11 +215,9 @@
 block discarded – undo
215 215
         if ($isGUID === true) {
216 216
             $username = $this->adldap->utilities()->strGuidToHex($username);
217 217
             $filter = "objectguid=" . $username;
218
-        }
219
-        else if (strpos($username, "@")) {
218
+        } else if (strpos($username, "@")) {
220 219
                 $filter = "userPrincipalName=" . $username;
221
-        }
222
-        else {
220
+        } else {
223 221
                 $filter = "samaccountname=" . $username;
224 222
         }
225 223
         $filter = "(&(objectCategory=person)({$filter}))";
Please login to merge, or discard this patch.
includes/libraries/LDAP/adLDAP/classes/adLDAPGroups.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
     }
152 152
 
153 153
     /**
154
-    * Create a group
155
-    * 
156
-    * @param array $attributes Default attributes of the group
157
-    * @return string|boolean
158
-    */
154
+     * Create a group
155
+     * 
156
+     * @param array $attributes Default attributes of the group
157
+     * @return string|boolean
158
+     */
159 159
     public function create($attributes) {
160 160
         if (!is_array($attributes)) { return "Attributes must be an array"; }
161 161
         if (!array_key_exists("group_name", $attributes)) { return "Missing compulsory field [group_name]"; }
@@ -184,12 +184,12 @@  discard block
 block discarded – undo
184 184
     }
185 185
     
186 186
     /**
187
-    * Delete a group account 
188
-    * 
189
-    * @param string $group The group to delete (please be careful here!) 
190
-    * 
191
-    * @return string|boolean 
192
-    */
187
+     * Delete a group account 
188
+     * 
189
+     * @param string $group The group to delete (please be careful here!) 
190
+     * 
191
+     * @return string|boolean 
192
+     */
193 193
     public function delete($group) {
194 194
         if (!$this->adldap->getLdapBind()) { return false; }
195 195
         if ($group === null) { return "Missing compulsory field [group]"; }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @param string $child The child group name
61 61
      * @return bool
62 62
      */
63
-    public function addGroup($parent,$child) {
63
+    public function addGroup($parent, $child) {
64 64
 
65 65
         // Find the parent group's dn
66 66
         $parentGroup = $this->ginfo($parent, array("cn"));
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      * @param string $child The child group name
241 241
      * @return bool
242 242
      */
243
-    public function removeGroup($parent , $child) {
243
+    public function removeGroup($parent, $child) {
244 244
     
245 245
         // Find the parent dn
246 246
         $parentGroup = $this->info($parent, array("cn"));
@@ -345,15 +345,15 @@  discard block
 block discarded – undo
345 345
  
346 346
         $groupArray = array();
347 347
 
348
-        for ($i=0; $i<$groups["count"]; $i++) { 
349
-                $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))";
348
+        for ($i = 0; $i < $groups["count"]; $i++) { 
349
+                $filter = "(&(objectCategory=group)(distinguishedName=".$this->adldap->utilities()->ldapSlashes($groups[$i])."))";
350 350
                 $fields = array("samaccountname", "distinguishedname", "objectClass");
351 351
                 $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
352 352
                 $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
353 353
 
354 354
                 // not a person, look for a group  
355 355
                 if ($entries['count'] == 0 && $recursive == true) {  
356
-                $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))";  
356
+                $filter = "(&(objectCategory=group)(distinguishedName=".$this->adldap->utilities()->ldapSlashes($groups[$i])."))";  
357 357
                 $fields = array("distinguishedname");  
358 358
                 $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);  
359 359
                 $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);  
@@ -395,15 +395,15 @@  discard block
 block discarded – undo
395 395
  
396 396
         $userArray = array();
397 397
 
398
-        for ($i=0; $i<$users["count"]; $i++) { 
399
-                $filter = "(&(objectCategory=person)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($users[$i]) . "))";
398
+        for ($i = 0; $i < $users["count"]; $i++) { 
399
+                $filter = "(&(objectCategory=person)(distinguishedName=".$this->adldap->utilities()->ldapSlashes($users[$i])."))";
400 400
                 $fields = array("samaccountname", "distinguishedname", "objectClass");
401 401
                 $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
402 402
                 $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
403 403
 
404 404
                 // not a person, look for a group  
405 405
                 if ($entries['count'] == 0 && $recursive == true) {  
406
-                $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($users[$i]) . "))";  
406
+                $filter = "(&(objectCategory=group)(distinguishedName=".$this->adldap->utilities()->ldapSlashes($users[$i])."))";  
407 407
                 $fields = array("samaccountname");  
408 408
                 $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);  
409 409
                 $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);  
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -215,8 +215,7 @@  discard block
 block discarded – undo
215 215
         $info = $this->info($group);
216 216
         if ($info[0]["dn"] === NULL) {
217 217
             return false;
218
-        }
219
-        else {
218
+        } else {
220 219
             $groupDN = $info[0]["dn"];
221 220
         }
222 221
         $newRDN = 'CN='.$newName;
@@ -416,15 +415,13 @@  discard block
 block discarded – undo
416 415
                     $userArray = array_unique($userArray);  
417 416
                 }
418 417
                 continue;  
419
-                } 
420
-                else if ($entries['count'] == 0) {   
418
+                } else if ($entries['count'] == 0) {   
421 419
                 continue; 
422 420
                 } 
423 421
 
424 422
                 if ((!isset($entries[0]['samaccountname'][0]) || $entries[0]['samaccountname'][0] === NULL) && $entries[0]['distinguishedname'][0] !== NULL) {
425 423
                     $userArray[] = $entries[0]['distinguishedname'][0];
426
-                }
427
-                else if ($entries[0]['samaccountname'][0] !== NULL) {
424
+                } else if ($entries[0]['samaccountname'][0] !== NULL) {
428 425
                 $userArray[] = $entries[0]['samaccountname'][0];
429 426
                 }
430 427
         }
Please login to merge, or discard this patch.