Change password of aspnet user

Declare @UserName NVarChar(30)
Declare @Password NVarChar(30)
Declare @Application NVarChar(255)
Declare @PasswordSalt NVarChar(128)

set @UserName = 'anders.friberg';
set @Password = 'password123';
set @Application = 'EPiServerSample';
Set @PasswordSalt = (SELECT 1 PasswordSalt FROM aspnet_Membership WHERE UserID IN (SELECT UserID FROM aspnet_Users u, aspnet_Applications a WHERE [email protected] and a.ApplicationName = @Application AND u.ApplicationId = a.ApplicationId))

Exec dbo.aspnet_Membership_ResetPassword @Application, @UserName, @Password, 10, 10, @PasswordSalt, -5

Leave a Reply

Your email address will not be published. Required fields are marked *