text: ﻿CREATE PROCEDURE dbo.aspnet_PersonalizationPerUser_ResetPageSettings (
      @ApplicationName  NVARCHAR(256),
      @UserName         NVARCHAR(256),
      @Path             NVARCHAR(256),
      @CurrentTimeUtc   DATETIME)
  AS
  BEGIN
      DECLARE @ApplicationId UNIQUEIDENTIFIER
      DECLARE @PathId UNIQUEIDENTIFIER
      DECLARE @UserId UNIQUEIDENTIFIER
  
      SELECT @ApplicationId = NULL
      SELECT @PathId = NULL
      SELECT @UserId = NULL
  
      EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
      IF (@ApplicationId IS NULL)
      BEGIN
          RETURN
      END
  
      SELECT @PathId = u.PathId FROM dbo.aspnet_Paths u WHERE u.ApplicationId = @ApplicationId AND u.LoweredPath = LOWER(@Path)
      IF (@PathId IS NULL)
      BEGIN
          RETURN
      END
  
      SELECT @UserId = u.UserId FROM dbo.aspnet_Users u WHERE u.ApplicationId = @ApplicationId AND u.LoweredUserName = LOWER(@UserName)
      IF (@UserId IS NULL)
      BEGIN
          RETURN
      END
  
      UPDATE   dbo.aspnet_Users WITH (ROWLOCK)
      SET      LastActivityDate = @CurrentTimeUtc
      WHERE    UserId = @UserId
      IF (@@ROWCOUNT = 0) -- Username not found
          RETURN
  
      DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE PathId = @PathId AND UserId = @UserId
      RETURN 0
  END