Zutil update

This commit is contained in:
Ziver Koc 2017-01-20 13:26:10 +01:00
parent 306ab86787
commit 1835a850f6

View file

@ -4,11 +4,10 @@ import zall.Zallery;
import zall.bean.User;
import zutil.db.DBConnection;
import zutil.net.smtp.Email;
import zutil.net.smtp.SMTPClient;
import zutil.net.smtp.SmtpClient;
import java.io.IOException;
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> 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.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. " +
"<a href='" + Zallery.getWebsiteURL() + "'>" + Zallery.getWebsiteURL() + "</a>");
SMTPClient smtp = new SMTPClient(host);
SmtpClient smtp = new SmtpClient(host);
smtp.send(email);
smtp.close();
}
@ -63,7 +62,7 @@ public class ZalleryEmail {
"<br>Name: <b>" + user.getName() + "</b>"
);
SMTPClient smtp = new SMTPClient(host);
SmtpClient smtp = new SmtpClient(host);
for(User admin : User.loadSuperUsers(db)){
if( admin.isEmailVerified() ){
email.setTo( admin.getEmail() );