$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
// 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) {
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)) {
$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) {
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);
$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) {
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;
}