         end
         
     end
-    -- update active access
-    -- ensure that access right are in place		
-        if not exists (select top 1
-            UserID	
-            from [{databaseOwner}].[{objectQualifier}ActiveAccess] WITH(NOLOCK) 
-            where UserID = @UserID )		
-            begin
-            insert into [{databaseOwner}].[{objectQualifier}ActiveAccess](
-            UserID,
-            BoardID,
-            ForumID,
-            IsAdmin, 
-            IsForumModerator,
-            IsModerator,
-            IsGuestX,
-            LastActive, 
-            ReadAccess,
-            PostAccess,
-            ReplyAccess,
-            PriorityAccess,
-            PollAccess,
-            VoteAccess,	
-            ModeratorAccess,
-            EditAccess,
-            DeleteAccess,
-            UploadAccess,
-            DownloadAccess)
-            select 
-            UserID, 
-            @BoardID, 
-            ForumID, 
-            IsAdmin,
-            IsForumModerator,
-            IsModerator,
-            @IsGuest,
-            @UTCTIMESTAMP,
-            ReadAccess,
-            (CONVERT([bit],sign([PostAccess]&(2)),(0))),
-            ReplyAccess,
-            PriorityAccess,
-            PollAccess,
-            VoteAccess,
-            ModeratorAccess,
-            EditAccess,
-            DeleteAccess,
-            UploadAccess,
-            DownloadAccess			
-            from [{databaseOwner}].[{objectQualifier}vaccess] 
-            where UserID = @UserID 
-            end
-
-                -- ensure that guest access right are in place		
-        if not exists (select top 1
-            UserID	
-            from [{databaseOwner}].[{objectQualifier}ActiveAccess] WITH(NOLOCK) 
-            where UserID = @GuestID )		
-            begin
-            insert into [{databaseOwner}].[{objectQualifier}ActiveAccess](
-            UserID,
-            BoardID,
-            ForumID,
-            IsAdmin, 
-            IsForumModerator,
-            IsModerator,
-            IsGuestX,
-            LastActive, 
-            ReadAccess,
-            PostAccess,
-            ReplyAccess,
-            PriorityAccess,
-            PollAccess,
-            VoteAccess,	
-            ModeratorAccess,
-            EditAccess,
-            DeleteAccess,
-            UploadAccess,
-            DownloadAccess)
-            select 
-            UserID, 
-            @BoardID, 
-            ForumID, 
-            IsAdmin,
-            IsForumModerator,
-            IsModerator,
-            @IsGuest,
-            @UTCTIMESTAMP,
-            ReadAccess,
-            (CONVERT([bit],sign([PostAccess]&(2)),(0))),
-            ReplyAccess,
-            PriorityAccess,
-            PollAccess,
-            VoteAccess,
-            ModeratorAccess,
-            EditAccess,
-            DeleteAccess,
-            UploadAccess,
-            DownloadAccess			
-            from [{databaseOwner}].[{objectQualifier}vaccess] 
-            where UserID = @GuestID 
-            end
-
-            
+	end
     -- return information
     select top 1
         ActiveUpdate        = ISNULL(@ActiveUpdate,0),

    if @TopicID is not null and not exists(select 1 from [{databaseOwner}].[{objectQualifier}Topic] where TopicID=@TopicID) begin
        set @TopicID = null
    end	
    
    -- get previous visit
    if  @IsGuest = 0	 begin
        select @PreviousVisit = LastVisit from [{databaseOwner}].[{objectQualifier}User] where UserID = @UserID
    end
    
    -- update last visit
    update [{databaseOwner}].[{objectQualifier}User] set 
        LastVisit = @UTCTIMESTAMP,
        IP = @IP
    where UserID = @UserID

    -- find missing ForumID/TopicID
    if @MessageID is not null begin

        set @IsCrawler = 0
        -- set IsRegistered ActiveFlag
        set @ActiveFlags = @ActiveFlags | 4
    end    

    -- Check valid ForumID
    if @ForumID is not null and not exists(select 1 from [{databaseOwner}].[{objectQualifier}Forum] where ForumID=@ForumID) begin
