3 // set to defaults if undefined
4 if (!isset($config->host
)) {
5 $config->host
= '127.0.0.1';
7 if (!isset($config->type
)) {
8 $config->type
= 'imap';
10 if (!isset($config->port
)) {
11 $config->port
= '143';
13 if (!isset($config->changepasswordurl
)) {
14 $config->changepasswordurl
= '';
18 <table cellspacing=
"0" cellpadding=
"5" border=
"0">
20 <tr valign=
"top" class=
"required">
21 <td align=
"right"><?php print_string('auth_imaphost_key', 'auth_imap') ?>:
</td>
23 <input name=
"host" type=
"text" size=
"30" value=
"<?php echo $config->host ?>" />
26 if (isset($err['host'])) {
27 echo $OUTPUT->error_text($err['host']);
35 print_string('auth_imaphost', 'auth_imap');
36 print_string('auth_multiplehosts', 'auth');
42 <tr valign=
"top" class=
"required">
43 <td align=
"right"><?php print_string('auth_imaptype_key', 'auth_imap') ?>:
</td>
47 $imaptypes = array('imap', 'imapssl', 'imapcert', 'imaptls');
48 foreach ($imaptypes as $imaptype) {
49 $imapoptions[$imaptype] = $imaptype;
51 echo html_writer
::select($imapoptions, 'type', $config->type
, false);
55 <td><?php print_string('auth_imaptype', 'auth_imap') ?></td>
58 <tr valign=
"top" class=
"required">
59 <td align=
"right"><?php print_string('auth_imapport_key', 'auth_imap') ?>:
</td>
61 <input name=
"port" type=
"text" size=
"6" value=
"<?php echo $config->port ?>" />
64 if (isset($err['port'])) {
65 echo $OUTPUT->error_text($err['port']);
70 <td><?php print_string('auth_imapport', 'auth_imap') ?></td>
74 <td align=
"right"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>:
</td>
76 <input name=
"changepasswordurl" type=
"text" value=
"<?php echo $config->changepasswordurl ?>" />
79 if (isset($err['changepasswordurl'])) {
80 echo $OUTPUT->error_text($err['changepasswordurl']);
85 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
90 print_auth_lock_options($this->authtype
, $user_fields, get_string('auth_fieldlocks_help', 'auth'), false, false);