/// <summary> /// Returns whether the user allows lockout /// </summary> /// <param name="manager"></param> /// <param name="userId"></param> /// <returns></returns> public static bool GetLockoutEnabled <TUser, TKey>(this UserManager <TUser, TKey> manager, TKey userId) where TKey : IEquatable <TKey> where TUser : class, IUser <TKey> { if (manager == null) { throw new ArgumentNullException("manager"); } return(AsyncHelper.RunSync(() => manager.GetLockoutEnabledAsync(userId))); }