passwort muss aus mindestens 6 zeichen bestehen
This commit is contained in:
@@ -51,9 +51,6 @@ export default function (globalData: IGlobalData): void {
|
||||
});
|
||||
|
||||
mp.events.add('CEF:Login_RegisterRequest', (password: string) => {
|
||||
if (password.length < 6) {
|
||||
return;
|
||||
}
|
||||
mp.events.callRemote('CLIENT:Login_RegisterRequest', password);
|
||||
});
|
||||
|
||||
|
||||
@@ -20,11 +20,18 @@ namespace ReallifeGamemode.Server.Events
|
||||
string username = player.Name;
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
if (password.Length < 6)
|
||||
{
|
||||
player.TriggerEvent("SERVER:Login_Error", "Das Passwort muss aus mindestens 6 Zeichen bestehen.");
|
||||
return;
|
||||
}
|
||||
if (dbContext.Users.Where(u => u.SocialClubName == player.SocialClubName).Count() >= 3)
|
||||
{
|
||||
player.TriggerEvent("SERVER:Login_Error", "Es sind schon 3 Konten mit dieser Socialclub-ID registriert.");
|
||||
return;
|
||||
}
|
||||
else if (!dbContext.Users.Any(u => u.Name.ToLower() == username.ToLower().Trim()))
|
||||
|
||||
if (!dbContext.Users.Any(u => u.Name.ToLower() == username.ToLower().Trim()))
|
||||
{
|
||||
var user = new User
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user