Added email field to user. issue 39

This commit is contained in:
Ziver Koc 2016-11-16 21:29:05 +01:00
parent d90bc0f59f
commit a55064846f
3 changed files with 14 additions and 0 deletions

View file

@ -12,6 +12,12 @@
<input type="text" class="form-control" id="username" name="username" value="{{user.getUsername()}}">
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-2 control-label">Email:</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="email" name="email" value="{{user.getEmail()}}">
</div>
</div>
<div class="form-group">
<label for="address" class="col-sm-2 control-label">Address:</label>
<div class="col-sm-10">

View file

@ -40,6 +40,7 @@ public class UserConfigHttpPage extends HalHttpPage {
localUser.setExternal(false);
}
localUser.setUsername(request.get("username"));
localUser.setEmail(request.get("email"));
localUser.setAddress(request.get("address"));
localUser.save(db);
break;

View file

@ -15,6 +15,7 @@ import java.util.List;
public class User extends DBBean{
private String username;
private String email;
private String address;
private int external;
@ -62,6 +63,12 @@ public class User extends DBBean{
public void setUsername(String name) {
this.username = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getAddress() {
return address;
}