mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 13:11:09 +00:00
Make sure no player already has the reserved UID when creating and account.
This commit is contained in:
parent
7f3e8984ac
commit
e1688c866f
@ -38,10 +38,18 @@ public final class DatabaseHelper {
|
||||
if (reservedId == GameConstants.SERVER_CONSOLE_UID) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Make sure not other accounts has that id as its reservedPlayerId
|
||||
exists = DatabaseHelper.getAccountByPlayerId(reservedId);
|
||||
if (exists != null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Make sure no existing player already has this id.
|
||||
Player existsPlayer = DatabaseHelper.getPlayerByUid(reservedId);
|
||||
if (existsPlayer != null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Account
|
||||
|
@ -103,7 +103,7 @@
|
||||
"account": {
|
||||
"modify": "Modify user accounts",
|
||||
"invalid": "Invalid UID.",
|
||||
"exists": "Account already exists.",
|
||||
"exists": "An account with this username and/or UID already exists.",
|
||||
"create": "Account created with UID %s.",
|
||||
"delete": "Account deleted.",
|
||||
"no_account": "Account not found.",
|
||||
|
Loading…
Reference in New Issue
Block a user