Skip to content
Snippets Groups Projects
Commit e049c33f authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Added example functions for attribute alter

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@286 44740490-163a-0410-bde0-09ae8108e29a
parent 0a7513fa
No related branches found
No related tags found
No related merge requests found
<?php
function attributealter_test(&$attributes, $spentityid = null, $idpentityid = null) {
$attributes['injected'] = array('newvalue');
}
function attributealter_realm(&$attributes, $spentityid = null, $idpentityid = null) {
if (array_key_exists('eduPersonPrincipalName', $attributes)) {
$eduppn = $attributes['eduPersonPrincipalName'][0];
$splitted = explode('@', $eduppn);
if (count($splitted) > 1) {
$attributes['realm'] = array($splitted[1]);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment