Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
-- Fix admin@demo.com user by resetting security stamp and clearing any corrupted claims
|
||||
-- Run this against the PowderCoatingDb database
|
||||
|
||||
-- Update security stamp (forces re-authentication)
|
||||
UPDATE AspNetUsers
|
||||
SET SecurityStamp = NEWID(),
|
||||
ConcurrencyStamp = NEWID()
|
||||
WHERE Email = 'admin@demo.com';
|
||||
|
||||
-- Delete any potentially corrupted user claims
|
||||
DELETE FROM AspNetUserClaims
|
||||
WHERE UserId = (SELECT Id FROM AspNetUsers WHERE Email = 'admin@demo.com');
|
||||
|
||||
-- Verify the user record
|
||||
SELECT
|
||||
Id,
|
||||
UserName,
|
||||
Email,
|
||||
CompanyId,
|
||||
CompanyRole,
|
||||
SecurityStamp,
|
||||
ConcurrencyStamp
|
||||
FROM AspNetUsers
|
||||
WHERE Email = 'admin@demo.com';
|
||||
|
||||
PRINT 'admin@demo.com user has been reset. Please log out and log back in.';
|
||||
Reference in New Issue
Block a user