Show all Hide all
Use this procedure to change a user's password.
You should never update the password / passwordhash columns in the User-table directly.
Area of use:
If the text '#SAME#' then the password will be unchanged.
Since you can't know what a user's password was if it has been hashed this is useful in newedits where you have to set the default value of the password field. Remember to use CONVERT(nvarchar(50), '#SAME#') in the GetEditFields procedure.
If you already have a hash of the password, for example because you've used a password field with the Hash Password setting then you can pass the hash directly to this procedure.
If you don't then just pass NULL and the procedure will hash the plaintext password in the @Password parameter.
Set to 1 to force the user to change his password the next time he logs in.
Defaults to 0.
Use current value.
If the new password has to comply with the current password policy.
Defaults to 1.
Language to use for error messages.
Error message. Null if no error.