Lines Matching defs:attributes
158 * @param array $attributes Default attributes of the group
161 public function create($attributes)
163 if (!is_array($attributes)){ return "Attributes must be an array"; }
164 if (!array_key_exists("group_name", $attributes)){ return "Missing compulsory field [group_name]"; }
165 if (!array_key_exists("container", $attributes)){ return "Missing compulsory field [container]"; }
166 if (!array_key_exists("description", $attributes)){ return "Missing compulsory field [description]"; }
167 if (!is_array($attributes["container"])){ return "Container attribute must be an array."; }
168 $attributes["container"] = array_reverse($attributes["container"]);
175 $add["cn"] = $attributes["group_name"];
176 $add["samaccountname"] = $attributes["group_name"];
178 $add["description"] = $attributes["description"];
181 $container = "OU=" . implode(",OU=", $attributes["container"]);