mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
Corrected example script in README
This commit is contained in:
parent
05ffd0842e
commit
4dbb62e0c0
1 changed files with 8 additions and 5 deletions
|
@ -144,12 +144,12 @@ Example file:
|
||||||
<?PHP
|
<?PHP
|
||||||
|
|
||||||
// Set the zip code and the adress
|
// Set the zip code and the adress
|
||||||
if ($_SERVER[$pluginconfig->field_map_address] != '')
|
if ($_SERVER[$this->config->field_map_address] != '')
|
||||||
{
|
{
|
||||||
// $address contains something like 'SWITCH$Limmatquai 138$CH-8021 Zurich'
|
// $address contains something like 'SWITCH$Limmatquai 138$CH-8021 Zurich'
|
||||||
// We want to split this up to get:
|
// We want to split this up to get:
|
||||||
// institution, street, zipcode, city and country
|
// institution, street, zipcode, city and country
|
||||||
$address = $_SERVER[$pluginconfig->field_map_address];
|
$address = $_SERVER[$this->config->field_map_address];
|
||||||
list($institution, $street, $zip_city) = split('\$', $address);
|
list($institution, $street, $zip_city) = split('\$', $address);
|
||||||
ereg(' (.+)',$zip_city, $regs);
|
ereg(' (.+)',$zip_city, $regs);
|
||||||
$city = $regs[1];
|
$city = $regs[1];
|
||||||
|
@ -161,7 +161,10 @@ Example file:
|
||||||
$result["city"] = $city;
|
$result["city"] = $city;
|
||||||
$result["country"] = $country;
|
$result["country"] = $country;
|
||||||
$result["department"] = $institution;
|
$result["department"] = $institution;
|
||||||
|
$result["description"] = "I am a Shibboleth user";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue