Added new configuration setting "country" to set a default country

for the site.  If this is set then user menus are pre-selected.
eg when signing up or filling out profile after external authentication.
This commit is contained in:
moodler 2002-12-14 08:18:18 +00:00
parent b2a2171f22
commit 778c28671a
9 changed files with 28 additions and 6 deletions

View file

@ -81,7 +81,13 @@ if (isadmin()) {
</tr>
<tr valign=top>
<td><P><? print_string("country") ?>:</td>
<td><? choose_from_menu ($COUNTRIES, "country", $user->country, get_string("selectacountry")."...", "", "") ?>
<td><?
if (!$user->country and $CFG->country) {
$user->country = $CFG->country;
}
choose_from_menu ($COUNTRIES, "country", $user->country, get_string("selectacountry")."...", "", "") ?>
<? formerr($err["country"]) ?>
</td>
</tr>