Prevent profiles with GUID.Empty as ID
This commit is contained in:
1 parent
fdeaea7f40
commit
9894685f28
2 files changed
+2
-2
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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)))
|
||||
|
||||
Reference in new issue
Block a user