mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Minor improvements to IMS-E enrol - better handling of empty <userid></userid>
This commit is contained in:
parent
a488b9325c
commit
2201638882
@ -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)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user