mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +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 Date muteChatUntil;
|
||||
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.host = host;
|
||||
this.sessionId = sessionId;
|
||||
|
@ -55,6 +56,7 @@ public class UserView implements Serializable {
|
|||
this.userState = userState;
|
||||
this.muteChatUntil = muteChatUntil;
|
||||
this.clientVersion = clientVersion;
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
|
@ -88,5 +90,9 @@ public class UserView implements Serializable {
|
|||
public Date getTimeConnected() {
|
||||
return timeConnected;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ public class MageServerImpl implements MageServer {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean resetPassword(String sessionId, String email, String authToken, String password) throws MageException {
|
||||
if (!ConfigSettings.getInstance().isAuthenticationActivated()) {
|
||||
|
@ -966,7 +966,8 @@ public class MageServerImpl implements MageServer {
|
|||
user.getGameInfo(),
|
||||
user.getUserState().toString(),
|
||||
user.getChatLockedUntil(),
|
||||
user.getClientVersion()
|
||||
user.getClientVersion(),
|
||||
user.getEmail()
|
||||
));
|
||||
}
|
||||
return users;
|
||||
|
|
|
@ -783,6 +783,13 @@ public class User {
|
|||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
if (authorizedUser != null) {
|
||||
return authorizedUser.email;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private void updateAuthorizedUser() {
|
||||
if (authorizedUser != null) {
|
||||
|
|
Loading…
Reference in a new issue