/// <summary>
 /// Determines whether [is current user owner].
 /// </summary>
 /// <param name="albumInst">The album inst.</param>
 /// <param name="owner">The owner.</param>
 /// <returns>
 /// <c>true</c> if [is current user owner]; otherwise, <c>false</c>.
 /// </returns>
 public static bool IsCurrentUserOwner(PhotoAlbumObject albumInst, object owner)
 {
     try
     {
         bool   result     = false;
         string currUser   = PhotoAlbumObject.ParseUserName(Sitecore.Context.User.Profile.UserName);
         string albumOwner = (string)HttpContext.Current.Session["CurrentUser"];
         if (currUser == albumOwner)
         {
             result = true;
         }
         return(result);
     }
     catch (Exception ex)
     {
         Log.Error("Cannot compare current user and current photo album creator", ex, owner);
         return(false);
     }
 }