Skip to content

Commit

Permalink
Minor improvements to IMS-E enrol - better handling of empty <userid>…
Browse files Browse the repository at this point in the history
…</userid>
  • Loading branch information
danstowell committed Apr 6, 2006
1 parent a488b93 commit 2201638
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enrol/imsenterprise/enrol.php
Expand Up @@ -526,8 +526,10 @@ function process_person_tag($tagcontents){
}
if(preg_match('{<userid>(.*?)</userid>}is', $tagcontents, $matches)){
$person->username = trim($matches[1]);
}elseif($CFG->enrol_imssourcedidfallback){
}
if($CFG->enrol_imssourcedidfallback && trim($person->username)==''){
// This is the point where we can fall back to useing the "sourcedid" if "userid" is not supplied
// NB We don't use an "elseif" because the tag may be supplied-but-empty
$person->username = $person->idnumber;
}
if(preg_match('{<email>(.*?)</email>}is', $tagcontents, $matches)){
Expand Down

0 comments on commit 2201638

Please sign in to comment.