Webserver:

-fix: Creating a player fails
-fix: Some error messages appear, even all is fine
-mod: removed the password set function (setting password is now a profile change)
This commit is contained in:
lukeIam committed 2013-12-13 18:02:56 +01:00
1 parent a69dd4344d
commit 38c506cd18
4 files changed
+48 -47

No files matched your search

@@ -168,13 +168,6 @@ namespace ServerLib
#region user management
private static SetPasswordDelegate _SetPassword;
public static SetPasswordDelegate SetPassword
{
internal get { return CServer._SetPassword; }
set { CServer._SetPassword = value; }
}
private static ValidatePasswordDelegate _ValidatePassword;
public static ValidatePasswordDelegate ValidatePassword
{
+2 -12
View File
@@ -81,7 +81,8 @@ namespace ServerLib
if (profile.ProfileId != -1) //-1 is the id for a new profile
{
if (!(_CheckRight(EUserRights.EditAllProfiles) || CSessionControl.GetUserIdFromSession(sessionKey) == profile.ProfileId))
if (!(_CheckRight(EUserRights.EditAllProfiles)
|| CSessionControl.GetUserIdFromSession(sessionKey) == profile.ProfileId))
{
return;
}
@@ -97,17 +98,6 @@ namespace ServerLib
return;
}
if (!string.IsNullOrEmpty(profile.Password))
{
int profileId = profile.ProfileId;
if (profileId == -1)
{
profileId = CServer.GetUserIdFromUsername(profile.PlayerName);
}
CServer.SetPassword(profileId, profile.Password);
}
CServer.SendProfileData(profile);
}