AttributeAlter: remove attributes when all their values are removed by the filter.
git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@3366 44740490-163a-0410-bde0-09ae8108e29a
This commit is contained in:
parent
724f878933
commit
bd4897d0eb
|
@ -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,
|
||||
|
|
Reference in New Issue