Kawai Wiki

Compare Revisions

Ignore whitespace Rev 147 → Rev 148

/trunk/src/main/java/org/kawai/model/User.java
9,8 → 9,6
private String password;
private String email;
private int groupId;
public User() { }
43,14 → 41,6
this.password = password;
}
 
public String getEmail() {
return email;
}
 
public void setEmail(String email) {
this.email = email;
}
 
public int getGroupId() {
return groupId;
}
/trunk/src/main/java/org/kawai/AppManager.java
86,7 → 86,6
.pk("id", DBTypes.AUTOINCREMENT)
.field("username", DBTypes.STRING)
.field("password", DBTypes.STRING)
.field("email", DBTypes.STRING)
.field("groupId", "group_id", DBTypes.INTEGER);
bean(Page.class, "Pages")
/trunk/src/main/java/org/kawai/action/UserAction.java
99,26 → 99,6
setSessionGroup(u.getGroup());
// send email asynchronous to user with password
Letter welcome = new TextLetter("welcome.txt");
welcome.setAttribute("username", u.getUsername());
welcome.setAttribute("password", u.getPassword());
try {
String subject = welcome.getSubject(getSessionLocale());
String body = welcome.getText(getSessionLocale());
SimpleEmail.sendLater(u.getUsername(), u.getEmail(), subject, body);
} catch(Exception e) {
System.err.println("Error sending email to: " + u.getEmail());
e.printStackTrace();
}
addMessage("registration_ok");
return CREATED;
/trunk/src/main/webapp/WEB-INF/db/kawai.sql
130,7 → 130,6
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(100) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`group_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_username` (`username`)
142,7 → 141,7
--
 
 
INSERT INTO `Users` VALUES (1,'admin','abc123','admin@admin.com.br',1),(2,'saoj','abc123','sergio.oliveira.jr@gmail.com',1),(3,'soliveira','abc123','pela@pela.com.br',2),(4,'fernando','abc123','a@a.com',1),(5,'helio','abc123','a@a.com',1),(6,'ricardo','abc123','a@a.com',1),(7,'robert','abc123','a@a.com',1);
INSERT INTO `Users` VALUES (1,'admin','abc123',1),(2,'saoj','abc123',1),(3,'soliveira','abc123',2),(4,'fernando','abc123',1),(5,'helio','abc123',1),(6,'ricardo','abc123',1),(7,'robert','abc123',1);
 
 
 
154,4 → 153,4
 
 
 
-- Dump completed on 2011-11-05 13:08:22
-- Dump completed on 2011-11-05 13:09:37