From 73e69f1cf71b9d1f6188561fa1d598f4ea54bb9b Mon Sep 17 00:00:00 2001 From: zacheiss Date: Fri, 29 May 2009 15:52:15 +0000 Subject: [PATCH] Display URL for appropriate webmail service (OWA vs webmail.mit.edu) based on whether the user is EXCHANGE or not. --- reg_svr/errors | 7 +++++++ reg_svr/reg_svr.pc | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/reg_svr/errors b/reg_svr/errors index 2dfd78db..12141d35 100644 --- a/reg_svr/errors +++ b/reg_svr/errors @@ -92,6 +92,13 @@ Your account has been registered and will become active later tonight. You should be able to log in by tomorrow morning using your Athena username (%s) and the password you chose. +MIT's central email service is in transition. + +Please note: To access your email account via a web browser (Firefox, +Internet Explorer, Safari), please use: + +%s + Welcome to Athena! # 21 BAD_PIN The PIN you typed was incorrect. Please make sure you typed it correctly. diff --git a/reg_svr/reg_svr.pc b/reg_svr/reg_svr.pc index 1016e186..7bdb6971 100644 --- a/reg_svr/reg_svr.pc +++ b/reg_svr/reg_svr.pc @@ -716,6 +716,7 @@ void PSWD(reg_client *rc, int argc, char **argv) char *password = argv[0], *p; EXEC SQL BEGIN DECLARE SECTION; char *login = rc->username; + char potype[USERS_POTYPE_SIZE]; EXEC SQL END DECLARE SECTION; if (!rc->username || rc->id || argc != 1) @@ -780,7 +781,11 @@ void PSWD(reg_client *rc, int argc, char **argv) EXEC SQL UPDATE users SET status = 1 WHERE login = :login; EXEC SQL COMMIT; - reply(rc, DONE, "INIT", "c", NULL, rc->username); + EXEC SQL SELECT potype INTO :potype FROM users WHERE login = :login; + if (!strcmp(potype, "EXCHANGE")) + reply(rc, DONE, "INIT", "c", NULL, rc->username, "http://owa.mit.edu"); + else + reply(rc, DONE, "INIT", "c", NULL, rc->username, "http://webmail.mit.edu"); } void QUIT(reg_client *rc, int argc, char **argv) -- 2.45.1