Prevent profiles with GUID.Empty as ID

This commit is contained in:
lukeIam committed 2018-04-30 14:24:42 +02:00
1 parent fdeaea7f40
commit 9894685f28
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -357,7 +357,7 @@ namespace Vocaluxe.Base
public static bool IsProfileIDValid(Guid profileID)
{
return _Profiles.ContainsKey(profileID);
return profileID != Guid.Empty && _Profiles.ContainsKey(profileID);
}
public static bool IsAvatarIDValid(int avatarID)
+1 -1
View File
@@ -90,7 +90,7 @@ namespace Vocaluxe.Base.Server
{
Guid sessionKey = _GetSession();
if (profile.ProfileId != Guid.Empty) //-1 is the id for a new profile
if (profile.ProfileId != Guid.Empty) //Guid.Empty is the id for a new profile
{
if (CSessionControl.GetUserIdFromSession(sessionKey) != profile.ProfileId
&& !(_CheckRight(EUserRights.EditAllProfiles)))