Skip to content
Snippets Groups Projects
Commit 9b44c647 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

AttributeAlter: remove attributes when all their values are removed by the filter.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3366 44740490-163a-0410-bde0-09ae8108e29a
parent 7d0df8f7
Branches
Tags
No related merge requests found
......@@ -166,6 +166,10 @@ class sspmod_core_Auth_Process_AttributeAlter extends SimpleSAML_Auth_Processing
}
}
$attributes[$this->target] = array_diff($attributes[$this->subject], $removedAttrs);
if (empty($attributes[$this->target])) {
unset($attributes[$this->target]);
}
} else { // replace only the part that matches
if ($this->subject === $this->target) {
$attributes[$this->target] = preg_replace($this->pattern, $this->replacement,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment