Completed
Pull Request — master (#7)
by
unknown
08:47
created
lib/Auth/Ldap.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -877,42 +877,42 @@
 block discarded – undo
877 877
      * Result of operation
878 878
      */
879 879
     public function setAttributes($dn, $attributes) {
880
-      if (!is_array($attributes)) {
880
+        if (!is_array($attributes)) {
881 881
         Logger::warning('Library - LDAP setAttributes(): No array of attributes given for DN \''.$dn.'\'');
882 882
         return false;
883
-      } else {
883
+        } else {
884 884
         Logger::debug('Library - LDAP setAttributes(): Recevied arraydata:'.print_r($attributes,true));
885
-      }
885
+        }
886 886
 
887
-      // Attempt to set attributes
888
-      $result = @ldap_mod_replace($this->ldap, $dn, $attributes);
889
-      if ($result === false) throw $this->makeException('Library - LDAP setAttributes(): Failed to set attributes for DN \''.$dn.'\'. Bind necessary?');
887
+        // Attempt to set attributes
888
+        $result = @ldap_mod_replace($this->ldap, $dn, $attributes);
889
+        if ($result === false) throw $this->makeException('Library - LDAP setAttributes(): Failed to set attributes for DN \''.$dn.'\'. Bind necessary?');
890 890
 
891
-      return $result;
891
+        return $result;
892 892
     }
893 893
 
894 894
     /**
895
-      * Adds for a given DN attributes
896
-      *
897
-      * @param string $dn
898
-      * The DN of an element.
899
-      * @param array $attributes
900
-      * The names and value of the attribute(s) to set using ldap_mod_add structure;
901
-      * @return bool
902
-      * Result of operation
903
-      */
904
-     public function addAttributes($dn, $attributes) {
905
-       if (!is_array($attributes)) {
906
-         Logger::warning('Library - LDAP addAttributes(): No array of attributes given for DN \''.$dn.'\'');
907
-         return false;
908
-       } else {
909
-         Logger::debug('Library - LDAP addAttributes(): Recevied arraydata:'.print_r($attributes,true));
910
-       }
911
-
912
-       // Attempt to add attributes
913
-       $result = @ldap_mod_add($this->ldap, $dn, $attributes);
914
-       if ($result === false) throw $this->makeException('Library - LDAP addAttributes(): Failed to set attributes for DN \''.$dn.'\'. Bind necessary?');
915
-
916
-       return $result;
917
-     }    
895
+     * Adds for a given DN attributes
896
+     *
897
+     * @param string $dn
898
+     * The DN of an element.
899
+     * @param array $attributes
900
+     * The names and value of the attribute(s) to set using ldap_mod_add structure;
901
+     * @return bool
902
+     * Result of operation
903
+     */
904
+        public function addAttributes($dn, $attributes) {
905
+        if (!is_array($attributes)) {
906
+            Logger::warning('Library - LDAP addAttributes(): No array of attributes given for DN \''.$dn.'\'');
907
+            return false;
908
+        } else {
909
+            Logger::debug('Library - LDAP addAttributes(): Recevied arraydata:'.print_r($attributes,true));
910
+        }
911
+
912
+        // Attempt to add attributes
913
+        $result = @ldap_mod_add($this->ldap, $dn, $attributes);
914
+        if ($result === false) throw $this->makeException('Library - LDAP addAttributes(): Failed to set attributes for DN \''.$dn.'\'. Bind necessary?');
915
+
916
+        return $result;
917
+        }    
918 918
 }
Please login to merge, or discard this patch.