mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Remove { error, and move things around
This commit is contained in:
parent
23cbf014c0
commit
704da28e4d
@ -5,8 +5,9 @@
|
||||
// Looks like it should work though ...
|
||||
|
||||
$CFG->auth_imaphost = "127.0.0.1"; // Should be IP number
|
||||
$CFG->auth_imaptype = "imap"; // imap, imapssl, imapcert
|
||||
$CFG->auth_imaptype = "imap"; // imap, imapssl, imapcert
|
||||
$CFG->auth_imapport = "143"; // 143, 993
|
||||
$CFG->auth_imapinfo = "Just use the same username and password as your school email account";
|
||||
|
||||
|
||||
function auth_user_login ($username, $password) {
|
||||
@ -16,15 +17,16 @@ function auth_user_login ($username, $password) {
|
||||
global $CFG;
|
||||
|
||||
switch ($CFG->auth_imaptype) {
|
||||
case "imap":
|
||||
$host = "{$CFG->auth_imaphost:$CFG->auth_imapport}INBOX";
|
||||
break;
|
||||
case "imapssl":
|
||||
$host = "{$CFG->auth_imaphost:$CFG->auth_imapport/imap/ssl}INBOX";
|
||||
$host = "\{$CFG->auth_imaphost:$CFG->auth_imapport/imap/ssl}INBOX";
|
||||
break;
|
||||
|
||||
case "imapcert":
|
||||
$host = "{$CFG->auth_imaphost:$CFG->auth_imapport/imap/ssl/novalidate-cert}INBOX";
|
||||
$host = "\{$CFG->auth_imaphost:$CFG->auth_imapport/imap/ssl/novalidate-cert}INBOX";
|
||||
break;
|
||||
|
||||
default:
|
||||
$host = "\{$CFG->auth_imaphost:$CFG->auth_imapport}INBOX";
|
||||
}
|
||||
|
||||
if ($connection = imap_open($host, $username, $password, OP_HALFOPEN)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user