Unlock a user
Log in to add to favouritesIf a user account has been locked by an administrator or from too many incorrect password attempts, the account can be unlocked by calling
- Unlock
- UnlockAsync
Syntax
public void Unlock()
{
}
public async Task UnlockAsync()
{
}
Examples
Unlock a user.
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Get the user
User user = client.Security.Users.Get("t.durden");
// Unlock the user
user.Unlock();
Unlock a user asynchronously.
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Get the user
User user = client.Security.Users.Get("t.durden");
// Unlock the user asynchronously
await user.UnlockAsync();