Slight updates

This commit is contained in:
moodler 2002-11-17 09:57:34 +00:00
parent 704da28e4d
commit 817c698e8f
4 changed files with 11 additions and 8 deletions

View File

@ -12,6 +12,7 @@ $CFG->auth_dbpass = "pass"; // Password matching the above username
$CFG->auth_dbtable = "users"; // Name of the table in the database
$CFG->auth_dbfielduser = "user"; // Name of the field containing usernames
$CFG->auth_dbfieldpass = "pass"; // Name of the field containing passwords
$CFG->auth_instructions = "Use the same username and password as your school account"; // Instructions
function auth_user_login ($username, $password) {
// Returns true if the username and password work

View File

@ -4,10 +4,10 @@
// This code is completely untested so far - IT NEEDS TESTERS!
// Looks like it should work though ...
$CFG->auth_imaphost = "127.0.0.1"; // Should be IP number
$CFG->auth_imaphost = "202.0.185.16"; // Should be IP number
$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";
$CFG->auth_instructions = "Use the same username and password as your school email account"; // Instructions
function auth_user_login ($username, $password) {
@ -18,15 +18,15 @@ function auth_user_login ($username, $password) {
switch ($CFG->auth_imaptype) {
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";
$host = "{".$CFG->auth_imaphost.":$CFG->auth_imapport}";
}
if ($connection = imap_open($host, $username, $password, OP_HALFOPEN)) {

View File

@ -6,6 +6,7 @@
$CFG->auth_nntphost = "127.0.0.1"; // Should be IP number
$CFG->auth_nntpport = "119"; // 119 is most common
$CFG->auth_instructions = "Use the same username and password as your school news account"; // Instructions
function auth_user_login ($username, $password) {
@ -14,7 +15,7 @@ function auth_user_login ($username, $password) {
global $CFG;
$host = "{$CFG->auth_nntphost:$CFG->auth_nntpport/nntp}";
$host = "{".$CFG->auth_nntphost.":$CFG->auth_nntpport/nntp}";
if ($connection = imap_open($host, $username, $password, OP_HALFOPEN)) {
imap_close($connection);

View File

@ -7,6 +7,7 @@
$CFG->auth_pop3host = "127.0.0.1"; // Should be IP number
$CFG->auth_pop3type = "pop3"; // pop3, pop3cert
$CFG->auth_pop3port = "110"; // 110 is most common
$CFG->auth_instructions = "Use the same username and password as your school email account"; // Instructions
function auth_user_login ($username, $password) {
@ -17,10 +18,10 @@ function auth_user_login ($username, $password) {
switch ($CFG->auth_pop3type) {
case "pop3":
$host = "{$CFG->auth_pop3host:$CFG->auth_pop3port/pop3}INBOX";
$host = "{".$CFG->auth_pop3host.":$CFG->auth_pop3port/pop3}INBOX";
break;
case "pop3cert":
$host = "{$CFG->auth_pop3host:$CFG->auth_pop3port/pop3/ssl/novalidate-cert}INBOX";
$host = "{".$CFG->auth_pop3host.":$CFG->auth_pop3port/pop3/ssl/novalidate-cert}INBOX";
break;
}