mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge pull request #2801 from spjspj/master
Add missing field to userData
This commit is contained in:
commit
ae03ad2453
3 changed files with 17 additions and 3 deletions
|
@ -45,8 +45,9 @@ public class UserView implements Serializable {
|
||||||
private final String userState;
|
private final String userState;
|
||||||
private final Date muteChatUntil;
|
private final Date muteChatUntil;
|
||||||
private final String clientVersion;
|
private final String clientVersion;
|
||||||
|
private final String email;
|
||||||
|
|
||||||
public UserView(String userName, String host, String sessionId, Date timeConnected, String gameInfo, String userState, Date muteChatUntil, String clientVersion) {
|
public UserView(String userName, String host, String sessionId, Date timeConnected, String gameInfo, String userState, Date muteChatUntil, String clientVersion, String email) {
|
||||||
this.userName = userName;
|
this.userName = userName;
|
||||||
this.host = host;
|
this.host = host;
|
||||||
this.sessionId = sessionId;
|
this.sessionId = sessionId;
|
||||||
|
@ -55,6 +56,7 @@ public class UserView implements Serializable {
|
||||||
this.userState = userState;
|
this.userState = userState;
|
||||||
this.muteChatUntil = muteChatUntil;
|
this.muteChatUntil = muteChatUntil;
|
||||||
this.clientVersion = clientVersion;
|
this.clientVersion = clientVersion;
|
||||||
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserName() {
|
public String getUserName() {
|
||||||
|
@ -89,4 +91,8 @@ public class UserView implements Serializable {
|
||||||
return timeConnected;
|
return timeConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -966,7 +966,8 @@ public class MageServerImpl implements MageServer {
|
||||||
user.getGameInfo(),
|
user.getGameInfo(),
|
||||||
user.getUserState().toString(),
|
user.getUserState().toString(),
|
||||||
user.getChatLockedUntil(),
|
user.getChatLockedUntil(),
|
||||||
user.getClientVersion()
|
user.getClientVersion(),
|
||||||
|
user.getEmail()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return users;
|
return users;
|
||||||
|
|
|
@ -784,6 +784,13 @@ public class User {
|
||||||
return number;
|
return number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
if (authorizedUser != null) {
|
||||||
|
return authorizedUser.email;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
private void updateAuthorizedUser() {
|
private void updateAuthorizedUser() {
|
||||||
if (authorizedUser != null) {
|
if (authorizedUser != null) {
|
||||||
authorizedUser.lastConnection = this.connectionTime;
|
authorizedUser.lastConnection = this.connectionTime;
|
||||||
|
|
Loading…
Reference in a new issue