mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +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() {
|
||||||
|
@ -88,5 +90,9 @@ public class UserView implements Serializable {
|
||||||
public Date getTimeConnected() {
|
public Date getTimeConnected() {
|
||||||
return timeConnected;
|
return timeConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class MageServerImpl implements MageServer {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean resetPassword(String sessionId, String email, String authToken, String password) throws MageException {
|
public boolean resetPassword(String sessionId, String email, String authToken, String password) throws MageException {
|
||||||
if (!ConfigSettings.getInstance().isAuthenticationActivated()) {
|
if (!ConfigSettings.getInstance().isAuthenticationActivated()) {
|
||||||
|
@ -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;
|
||||||
|
|
|
@ -783,6 +783,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) {
|
||||||
|
|
Loading…
Reference in a new issue