expressappframework-devexpress-dot-persistent-dot-baseimpl-dot-permissionpolicy-dot-permissionpolicyuser-dot-setpassword-x28-system-dot-string-x29.md
Changes the user password.
Namespace : DevExpress.Persistent.BaseImpl.PermissionPolicy
Assembly : DevExpress.Persistent.BaseImpl.Xpo.v25.2.dll
NuGet Package : DevExpress.Persistent.BaseImpl.Xpo
public void SetPassword(
string password
)
Public Sub SetPassword(
password As String
)
| Name | Type | Description |
|---|---|---|
| password | String |
A string which is a new password.
|
The PermissionPolicyUser class declares the protected StoredPassword property to store a password. Passwords are stored encrypted and cannot be changed directly. Use this method to specify a password when creating a new user in code. An example is provided in the Client-Side Security (2-Tier Architecture) topic.
If you need to allow a user to change password using the ChangePassword action, grant the write access to the StoredPassword property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the SetPassword(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
xaf-save-and-share-custom-view-settings/CS/ViewSettingsSolution.Module/DatabaseUpdate/Updater.cs#L30
sampleUser.UserName = "User";
sampleUser.SetPassword("");
}
sampleUser.UserName = "User";
sampleUser.SetPassword("");
}
sampleUser.UserName = "User";
sampleUser.SetPassword("");
}
sampleUser.UserName = "User";
sampleUser.SetPassword("");
}
XAF_How-to-get-role-code-from-the-UI/CS/XafSolution.Module/DatabaseUpdate/Updater.cs#L85
sampleUser.UserName = "User";
sampleUser.SetPassword("");
}
xaf-save-and-share-custom-view-settings/VB/ViewSettingsSolution.Module/DatabaseUpdate/Updater.vb#L33
sampleUser.UserName = "User"
sampleUser.SetPassword("")
End If
sampleUser.UserName = "User"
sampleUser.SetPassword("")
End If
sampleUser.UserName = "User"
sampleUser.SetPassword("")
End If
sampleUser.UserName = "User"
sampleUser.SetPassword("")
End If
XAF_How-to-get-role-code-from-the-UI/VB/XafSolution.Module/DatabaseUpdate/Updater.vb#L87
sampleUser.UserName = "User"
sampleUser.SetPassword("")
End If
See Also