moodle/auth/cas/config.html

828 lines
14 KiB
HTML
Raw Normal View History

2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
global $CFG;
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
require_once 'languages.php';
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$createoptions[0] = get_string("no");
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$createoptions[1] = get_string("yes");
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
// set to defaults if undefined (CAS)
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->hostname))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->hostname = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->port))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->port = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->casversion))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->casversion = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->baseuri))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->baseuri = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->language))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->language = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->proxycas))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->proxycas = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->logoutcas))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->logoutcas = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset ($config->multiauth))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$config->multiauth = '';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
// set to defaults if undefined (LDAP)
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->host_url))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{ $config->host_url = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (empty($config->ldapencoding))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{ $config->ldapencoding = 'utf-8'; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->contexts))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{ $config->contexts = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->user_type))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{ $config->user_type = 'default'; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->user_attribute))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{ $config->user_attribute = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->search_sub))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{ $config->search_sub = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->opt_deref))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{ $config->opt_deref = LDAP_DEREF_NEVER; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->bind_dn))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->bind_dn = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->bind_pw))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->bind_pw = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->version))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->version = '2'; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->objectclass))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->objectclass = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->memberattribute))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->memberattribute = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->memberattribute_isdn))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->memberattribute_isdn = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->groupecreators))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->groupecreators = ''; }
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!isset($config->attrcreators))
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
{$config->attrcreators = ''; }
2007-07-17 11:46:19 +00:00
if (!isset($config->removeuser))
2007-05-21 07:11:12 +00:00
{$config->removeuser = 0; }
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$yesno = array( get_string('no'), get_string('yes') );
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
notify(get_string('auth_ldap_noextension','auth'));
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
}
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<table cellspacing="0" cellpadding="5" border="0" align="center">
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td colspan="2">
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
<h4><?php print_string('auth_cas_server_settings', 'auth') ?> </h4>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
</td>
2007-07-09 08:49:47 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_hostname_key', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (isset($err['hostname'])) {
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
formerr($err['hostname']);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
}
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_hostname', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_baseuri_key', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (isset($err['baseuri'])) {
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
formerr($err['baseuri']);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
}
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_baseuri', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_port_key', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (isset($err['port'])) {
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
formerr($err['port']);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
}
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_port', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_casversion', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="casversion" type="text" size="30" value="<?php echo $config->casversion ?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (isset($err['casversion'])) {
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
formerr($err['casversion']);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
}
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_version', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_language_key', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
choose_from_menu($CASLANGUAGES, 'language', $config->language, '');
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_language', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_proxycas_key', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
unset($options);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$options[1] = get_string('yes');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
choose_from_menu ($options, 'proxycas', $config->proxycas, get_string('no'), '', '');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_proxycas', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_logoutcas_key', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
unset($options);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$options[1] = get_string('yes');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
choose_from_menu ($options, 'logoutcas', $config->logoutcas, get_string('no'), '', '');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_logoutcas', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><?php print_string('auth_cas_multiauth_key', 'auth') ?>:</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
unset($options);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$options[1] = get_string('yes');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
choose_from_menu ($options, 'multiauth', $config->multiauth, get_string('no'), '', '');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_cas_multiauth', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td colspan="2">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<h4><?php print_string('auth_ldap_server_settings', 'auth') ?> </h4>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="host_url"><?php print_string('auth_ldap_host_url_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="host_url" id="host_url" type="text" size="30" value="<?php echo $config->host_url?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['host_url'])) formerr($err['host_url']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_host_url','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="menuversion"><?php print_string('auth_ldap_version_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$versions = array();
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$versions[2] = '2';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$versions[3] = '3';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
choose_from_menu($versions, 'version', $config->version, '');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (isset($err['version'])) formerr($err['version']);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_version','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="ldapencoding"><?php print_string("auth_ldap_ldap_encoding_key", "auth") ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input id="ldapencoding" name="ldapencoding" type="text" value="<?php echo $config->ldapencoding ?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (isset($err['ldapencoding'])) {
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
formerr($err['ldapencoding']);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
}
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td><?php print_string('auth_ldap_ldap_encoding', 'auth') ?></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td colspan="2">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<h4><?php print_string('auth_ldap_bind_settings', 'auth') ?> </h4>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="bind_dn"><?php print_string('auth_ldap_bind_dn_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="bind_dn" id="bind_dn" type="text" size="30" value="<?php echo $config->bind_dn?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['bind_dn'])) formerr($err['bind_dn']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td><td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_bind_dn','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="bind_pw"><?php print_string('auth_ldap_bind_pw_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="bind_pw" id="bind_pw" type="password" size="30" value="<?php echo $config->bind_pw?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['bind_pw'])) formerr($err['bind_pw']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td><td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_bind_pw','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td colspan="2">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<h4><?php print_string('auth_ldap_user_settings', 'auth') ?> </h4>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="menuuser_type"><?php print_string('auth_ldap_user_type_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php choose_from_menu($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['user_type'])) formerr($err['user_type']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_user_type', 'auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="contexts"><?php print_string('auth_ldap_contexts_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="contexts" id="contexts" type="text" size="30" value="<?php echo $config->contexts?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['contexts'])) formerr($err['contexts']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_contexts', 'auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="menusearch_sub"><?php print_string('auth_ldap_search_sub_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php choose_from_menu($yesno, 'search_sub', $config->search_sub, ''); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_search_sub','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="menuopt_deref"><?php print_string('auth_ldap_opt_deref_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$opt_deref = array();
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$opt_deref[LDAP_DEREF_NEVER] = get_string('no');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, '');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
if (isset($err['opt_deref'])) formerr($err['opt_deref']);
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_opt_deref','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="user_attribute"><?php print_string('auth_ldap_user_attribute_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="user_attribute" id="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['user_attribute'])) formerr($err['user_attribute']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_user_attribute','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="memberattribute"><?php print_string('auth_ldap_memberattribute_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="memberattribute" id="memberattribute" type="text" size="30" value="<?php echo $config->memberattribute?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['memberattribute'])) formerr($err['memberattribute']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td><td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_memberattribute','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="memberattribute_isdn"><?php print_string('auth_ldap_memberattribute_isdn_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="memberattribute_isdn" id="memberattribute_isdn" type="text" size="30" value="<?php echo $config->memberattribute_isdn?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['memberattribute_isdn'])) formerr($err['memberattribute_isdn']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td><td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_memberattribute_isdn','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="objectclass"><?php print_string('auth_ldap_objectclass_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="objectclass" id="objectclass" type="text" size="30" value="<?php echo $config->objectclass?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['objectclass'])) formerr($err['objectclass']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_objectclass','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td colspan="2">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<h4><?php print_string('coursecreators') ?> </h4>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="attrcreators_key"><?php print_string('auth_ldap_attrcreators_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="attrcreators" id="attrcreators" type="text" size="30" value="<?php echo $config->attrcreators?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['attrcreators'])) formerr($err['attrcreators']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td><td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_attrcreators','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top" class="required">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="groupecreators_key"><?php print_string('auth_ldap_groupecreators_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<input name="groupecreators" id="groupecreators" type="text" size="30" value="<?php echo $config->groupecreators?>" />
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php if (isset($err['groupecreators'])) formerr($err['groupecreators']); ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td><td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_ldap_groupecreators','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td colspan="2">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<h4><?php print_string('auth_sync_script', 'auth') ?> </h4>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<tr valign="top">
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td align="right"><label for="menuremoveuser"><?php print_string('auth_remove_user_key','auth') ?></label></td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$deleteopt = array();
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$deleteopt['0'] = get_string('auth_remove_keep','auth');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$deleteopt['1'] = get_string('auth_remove_suspend','auth');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$deleteopt['2'] = get_string('auth_remove_delete','auth');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
choose_from_menu($deleteopt, 'removeuser', $config->removeuser, '');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php print_string('auth_remove_user','auth') ?>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</td>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
</tr>
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
<?php
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$help = get_string('auth_ldapextrafields','auth');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$help .= get_string('auth_updatelocal_expl','auth');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$help .= get_string('auth_fieldlock_expl','auth');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$help .= get_string('auth_updateremote_expl','auth');
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$help .= '<hr />';
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
$help .= get_string('auth_updateremote_ldap','auth');
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
print_auth_lock_options('cas', $user_fields, $help, true, true);
2007-07-09 08:49:47 +00:00
2007-07-17 11:46:19 +00:00
2007-05-21 07:11:12 +00:00
?>
2007-07-17 11:46:19 +00:00
</table>