diff --git a/ClientServerLib/ClientServerLib/CWebservice.cs b/ClientServerLib/ClientServerLib/CWebservice.cs
index e6fa5f11..9e626de1 100644
--- a/ClientServerLib/ClientServerLib/CWebservice.cs
+++ b/ClientServerLib/ClientServerLib/CWebservice.cs
@@ -197,7 +197,20 @@ namespace ServerLib
return false;
}
- return CServer.SendProfileData(profile);
+ bool result = CServer.SendProfileData(profile);
+
+ if (profile.Password != null && profile.Password != "")
+ {
+ int profileId = profile.ProfileId;
+ if (profileId == -1)
+ {
+ profileId = CServer.GetUserIdFromUsername(profile.PlayerName);
+ }
+
+ CServer.SetPassword(profileId, profile.Password);
+ }
+
+ return result;
}
public ProfileData getProfile(int profileId)
diff --git a/ClientServerLib/ClientServerLib/DataStructs.cs b/ClientServerLib/ClientServerLib/DataStructs.cs
index 700f76fa..894c2a28 100644
--- a/ClientServerLib/ClientServerLib/DataStructs.cs
+++ b/ClientServerLib/ClientServerLib/DataStructs.cs
@@ -34,6 +34,8 @@ namespace ServerLib
public int ProfileId;
[DataMember]
public bool IsEditable;
+ [DataMember]
+ public string Password;
}
#endregion
diff --git a/Vocaluxe/Website/index.html b/Vocaluxe/Website/index.html
index 2f456753..54ead8a1 100644
--- a/Vocaluxe/Website/index.html
+++ b/Vocaluxe/Website/index.html
@@ -130,6 +130,10 @@
+
+
+
+
Save and upload
diff --git a/Vocaluxe/Website/js/main.js b/Vocaluxe/Website/js/main.js
index 740687a1..1df294ff 100644
--- a/Vocaluxe/Website/js/main.js
+++ b/Vocaluxe/Website/js/main.js
@@ -53,12 +53,13 @@ function initPageLoadHandler() {
dataToUpload["Type"] = $('#playerType').prop("value");
dataToUpload["Difficulty"] = $('#playerDifficulty').prop("value");
dataToUpload["Avatar"] = $('#playerAvatar').data("changed") ? { "base64Data": $('#playerAvatar').prop("src") } : null;
+ dataToUpload["Password"] = $('#playerPassword').prop("value") != "**oldPassword**" ? $('#playerPassword').prop("value") : null;
$('#content').wrap('