Zutil update
This commit is contained in:
parent
306ab86787
commit
1835a850f6
1 changed files with 4 additions and 5 deletions
|
|
@ -4,11 +4,10 @@ import zall.Zallery;
|
||||||
import zall.bean.User;
|
import zall.bean.User;
|
||||||
import zutil.db.DBConnection;
|
import zutil.db.DBConnection;
|
||||||
import zutil.net.smtp.Email;
|
import zutil.net.smtp.Email;
|
||||||
import zutil.net.smtp.SMTPClient;
|
import zutil.net.smtp.SmtpClient;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -32,7 +31,7 @@ public class ZalleryEmail {
|
||||||
"<p><a href='"+Zallery.getWebsiteURL()+"?action=verfemail&id="+user.getId()+"&hash="+user.getEmailVerificationHash()+"'>"+Zallery.getWebsiteURL()+"?action=verfemail&id="+user.getId()+"&hash="+user.getEmailVerificationHash()+"</a>" +
|
"<p><a href='"+Zallery.getWebsiteURL()+"?action=verfemail&id="+user.getId()+"&hash="+user.getEmailVerificationHash()+"'>"+Zallery.getWebsiteURL()+"?action=verfemail&id="+user.getId()+"&hash="+user.getEmailVerificationHash()+"</a>" +
|
||||||
"<p> You will have to wait for an admin to activate your account after you have verified your email.");
|
"<p> You will have to wait for an admin to activate your account after you have verified your email.");
|
||||||
|
|
||||||
SMTPClient smtp = new SMTPClient(host);
|
SmtpClient smtp = new SmtpClient(host);
|
||||||
smtp.send(email);
|
smtp.send(email);
|
||||||
smtp.close();
|
smtp.close();
|
||||||
}
|
}
|
||||||
|
|
@ -46,7 +45,7 @@ public class ZalleryEmail {
|
||||||
email.setMessage("Your account has now been activated by an admin. You can now login and use the site. " +
|
email.setMessage("Your account has now been activated by an admin. You can now login and use the site. " +
|
||||||
"<a href='" + Zallery.getWebsiteURL() + "'>" + Zallery.getWebsiteURL() + "</a>");
|
"<a href='" + Zallery.getWebsiteURL() + "'>" + Zallery.getWebsiteURL() + "</a>");
|
||||||
|
|
||||||
SMTPClient smtp = new SMTPClient(host);
|
SmtpClient smtp = new SmtpClient(host);
|
||||||
smtp.send(email);
|
smtp.send(email);
|
||||||
smtp.close();
|
smtp.close();
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +62,7 @@ public class ZalleryEmail {
|
||||||
"<br>Name: <b>" + user.getName() + "</b>"
|
"<br>Name: <b>" + user.getName() + "</b>"
|
||||||
);
|
);
|
||||||
|
|
||||||
SMTPClient smtp = new SMTPClient(host);
|
SmtpClient smtp = new SmtpClient(host);
|
||||||
for(User admin : User.loadSuperUsers(db)){
|
for(User admin : User.loadSuperUsers(db)){
|
||||||
if( admin.isEmailVerified() ){
|
if( admin.isEmailVerified() ){
|
||||||
email.setTo( admin.getEmail() );
|
email.setTo( admin.getEmail() );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue