CenterForDigitalHumanities / TPEN28

Split front/back ends from each other
3 stars 2 forks source link

Invite User - Admin Approve E-mail #545

Open thehabes opened 3 years ago

thehabes commented 3 years ago
textdisplay.mailer m = new textdisplay.mailer();
String body = this.getFname() + " " + this.getLname() + " (" + this.getUname() + ") has invited  "
        + newUser.getFname() + " " + newUser.getLname() + " (" + newUser.getUname()
        + ") to join TPEN, which needs your approval.\n";
try {
    m.sendMail(getRbTok("EMAILSERVER"), "TPEN@t-pen.org", getRbTok("NOTIFICATIONEMAIL"),
            "new user request", body);
} catch (MessagingException e) {
    emailFailure = true;
}
// send a notification email to the invitee
body = this.getFname() + " " + this.getLname() + " (" + this.getUname()
        + ") has invited you to join their transcription project on TPEN.  \n"
        + "If you'd like to accept, head to http://t-pen.org/TPEN/admin.jsp and enter "+uname+" to activate your account. "
        + "You will receive an email to set your password and may then update your username and start your own projects.\n\n"
        + "This is the last message you will receive if you do not wish to create an account and no further action is required.\n\n"
        + "Thanks for transcribing, the TPEN team";
try {
    m.sendMail(getRbTok("EMAILSERVER"), "TPEN@t-pen.org", newUser.getUname(),
            "An invitation to transcribe on t-pen.org", body);
} catch (MessagingException e) {
    emailFailure = true;
}

It is still sending digitalhumanities@slu.edu an E-mail and the invitee still needs administrator approval it seems.

image

thehabes commented 3 years ago

From https://github.com/CenterForDigitalHumanities/TPEN-NL/issues/62

https://github.com/CenterForDigitalHumanities/TPEN28/blob/5e2202b6756645232dc302a36c0e23767ceadb05/src/java/user/User.java#L424

re:^^ I used the invite() pipeline through project.jsp, not signup(). I invited a non-existing user to T-PEN when I was on project.jsp for my project. thehabes1110@gmail.com got the E-mail and when I followed the instructions to go admin.jsp and accept the invitation, it said does not exist or needs admin approval

image