160771ee0b5885cb4bd899841be12f949e75ae09 chinhli Wed May 30 16:34:54 2012 -0700 Add 'Your account has been activated.' message to login screen after account is activated. diff --git src/hg/hgLogin/hgLogin.c src/hg/hgLogin/hgLogin.c index 4b0d9b7..9d6f5bb 100644 --- src/hg/hgLogin/hgLogin.c +++ src/hg/hgLogin/hgLogin.c @@ -266,32 +266,32 @@ "window.setTimeout(afterDelay, %d);\n" "function afterDelay() {\n" "window.location =\"%s\";\n}" "\n//-->\n" "", delay, returnURL); } void displayActMailSuccess() /* display Activate mail success box */ { char *returnURL = getReturnToURL(); hPrintf( "
An account activation email has been sent to you. \n" - "Please activate your account within 7 days.
" + "A confirmation email has been sent to you. \n" + "Please click the confirmation link in the email to activate your account.
" "\n" "", returnURL); cartRemove(cart, "hgLogin_email"); cartRemove(cart, "hgLogin_userName"); } void sendActMailOut(char *email, char *subject, char *msg) /* send mail to email address */ { char *hgLoginHost = wikiLinkHost(); char cmd[4096]; safef(cmd,sizeof(cmd), "echo '%s' | mail -s \"%s\" %s" , msg, subject, email); int result = system(cmd); @@ -364,31 +364,30 @@ void mailUsername(char *email, char *users) /* send user name list to the email address */ { char subject[256]; char msg[256]; char *remoteAddr=getenv("REMOTE_ADDR"); safef(subject, sizeof(subject),"Your user name at the UCSC Genome Browser"); safef(msg, sizeof(msg), "Someone (probably you, from IP address %s) has requested user name(s) associated with this email address at UCSC Genome Browser: \n\n %s\n\n", remoteAddr, users); safecat (msg, sizeof(msg), signature); sendMailOut(email, subject, msg); } - void sendUsername(struct sqlConnection *conn, char *email) /* email user username(s) */ { struct sqlResult *sr; char **row; char query[256]; /* find all the user names assocaited with this email address */ char userList[256]=""; safef(query,sizeof(query),"select * from gbMembers where email='%s'", email); sr = sqlGetResult(conn, query); int numUser = 0; while ((row = sqlNextRow(sr)) != NULL) { struct gbMembers *m = gbMembersLoad(row); @@ -551,33 +550,35 @@ ); sqlUpdate(conn, query); sendActivateMail(email, username, tokenMD5); return; } void displayLoginPage(struct sqlConnection *conn) /* draw the account login page */ { char *username = cartUsualString(cart, "hgLogin_userName", ""); hPrintf("