- // During second pass we import data.
- if (!$this->firstPass && $this->canImport) {
- // Nothing is done here, see startElement for second pass.
- }
- }
-
- // dataElement - callback handler for text data fragments. It builds up currentElement array with text pieces from XML.
- function dataElement($parser, $data) {
- if ($this->currentTag == 'NAME'
- || $this->currentTag == 'DESCRIPTION'
- || $this->currentTag == 'LABEL'
- || $this->currentTag == 'VALUE'
- || $this->currentTag == 'COMMENT'
- || $this->currentTag == 'ADDRESS'
- || $this->currentTag == 'ALLOW_IP'
- || $this->currentTag == 'PASSWORD_COMPLEXITY') {
- if (isset($this->currentElement[$this->currentTag]))
- $this->currentElement[$this->currentTag] .= trim($data);
- else
- $this->currentElement[$this->currentTag] = trim($data);
+ if ($name == 'ROLE') {
+ // We get here when processing a <role> tag for the current group.
+ // Add new role to $this->currentGroupRoles and a mapping to $this->currentGroupRoleMap.
+ $this->currentGroupRoles[$attrs['ID']] = $attrs;
+ }