Interface IUserManager
Assembly: MediaBrowser.Controller.dll
public interface IUserManager
Properties
Declaration
[Obsolete("Use GetUsers, GetUserList, GetUserIds, GetUserIdList, or GetUserCount to get a list of users based on a filter set. Avoid working with the entire user list all at once.")]
User[] Users { get; }
Property Value
Type |
Description |
User[] |
The users.
|
Methods
Declaration
void AddParts(IEnumerable<IAuthenticationProvider> authenticationProviders, IEnumerable<IUserConfigurationFactory> configurationFactories)
Parameters
Declaration
Task<User> AuthenticateUser(string username, string password, bool isUserSession, bool isInLocalNetwork, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
password |
|
System.Boolean |
isUserSession |
|
System.Boolean |
isInLocalNetwork |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<User> |
|
Declaration
Task ChangePassword(User user, string newPassword)
Parameters
Type |
Name |
Description |
User |
user |
|
System.String |
newPassword |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Declaration
Task<User> CreateUser(string name, User cloneFromUser, UserCopyOptions[] userCopyOptions)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<User> |
|
Declaration
Task<User> CreateUser(string name, UserPolicy userPolicy)
Parameters
Type |
Name |
Description |
System.String |
name |
The name.
|
UserPolicy |
userPolicy |
The user policy.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<User> |
User.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
name
|
System.ArgumentException |
|
Declaration
Task DeleteUser(User user)
Parameters
Type |
Name |
Description |
User |
user |
The user.
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
Task.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
user
|
System.ArgumentException |
|
Declaration
NameIdPair[] GetAuthenticationProviders()
Returns
Declaration
Parameters
Type |
Name |
Description |
System.Int64 |
id |
|
Returns
Type |
Description |
System.Guid |
|
Declaration
Guid GetGuid(ReadOnlySpan<char> id)
Parameters
Type |
Name |
Description |
System.ReadOnlySpan<System.Char> |
id |
|
Returns
Type |
Description |
System.Guid |
|
Declaration
long GetInternalId(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
|
Returns
Type |
Description |
System.Int64 |
|
Declaration
long GetInternalId(ReadOnlySpan<char> id)
Parameters
Type |
Name |
Description |
System.ReadOnlySpan<System.Char> |
id |
|
Returns
Type |
Description |
System.Int64 |
|
Declaration
long GetInternalId(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
Type |
Description |
System.Int64 |
|
Declaration
object GetTypedUserSetting(long userId, string key)
Parameters
Type |
Name |
Description |
System.Int64 |
userId |
|
System.String |
key |
|
Returns
Type |
Description |
System.Object |
|
Declaration
User GetUserById(Guid id)
Parameters
Type |
Name |
Description |
System.Guid |
id |
The id.
|
Returns
Type |
Description |
User |
User.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
|
Declaration
User GetUserById(long id)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
|
Returns
Declaration
User GetUserById(ReadOnlySpan<char> id)
Parameters
Type |
Name |
Description |
System.ReadOnlySpan<System.Char> |
id |
|
Returns
Gets the user by identifier.
Declaration
User GetUserById(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
The identifier.
|
Returns
Type |
Description |
User |
User.
|
Declaration
User GetUserByName(ReadOnlySpan<char> name)
Parameters
Type |
Name |
Description |
System.ReadOnlySpan<System.Char> |
name |
|
Returns
Gets the name of the user by.
Declaration
User GetUserByName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
The name.
|
Returns
Type |
Description |
User |
User.
|
Gets the user configuration.
Declaration
UserConfiguration GetUserConfiguration(User user)
Parameters
Type |
Name |
Description |
User |
user |
The user.
|
Returns
Declaration
int GetUserCount(UserQuery query)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Declaration
UserDto GetUserDto(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Returns
Declaration
UserDto GetUserDto(User user, bool isAuthenticated)
Parameters
Type |
Name |
Description |
User |
user |
|
System.Boolean |
isAuthenticated |
|
Returns
Declaration
long[] GetUserIdList(UserQuery query)
Parameters
Returns
Type |
Description |
System.Int64[] |
|
Declaration
QueryResult<long> GetUserIds(UserQuery query)
Parameters
Returns
Declaration
User[] GetUserList(UserQuery query)
Parameters
Returns
Declaration
UserPolicy GetUserPolicy(User user)
Parameters
Type |
Name |
Description |
User |
user |
The user.
|
Returns
Declaration
QueryResult<User> GetUsers(UserQuery query)
Parameters
Returns
Declaration
string GetUserSetting(long userId, string key)
Parameters
Type |
Name |
Description |
System.Int64 |
userId |
|
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
Declaration
Type GetUserSettingsType(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Type |
|
Declaration
long[] GetUsersWithSettings(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int64[] |
|
Makes the valid username.
Declaration
string MakeValidUsername(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
The username.
|
Returns
Type |
Description |
System.String |
System.String.
|
Redeems the password reset pin.
Declaration
Task<PinRedeemResult> RedeemPasswordResetPin(string pin)
Parameters
Type |
Name |
Description |
System.String |
pin |
The pin.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<PinRedeemResult> |
true if XXXX, false otherwise.
|
Refreshes metadata for each user
Declaration
Task RefreshUsersMetadata(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
The cancellation token.
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
Task.
|
Declaration
Task RenameUser(User user, string newName)
Parameters
Type |
Name |
Description |
User |
user |
The user.
|
System.String |
newName |
The new name.
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
Task.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
user
|
System.ArgumentException |
|
Declaration
Task ResetPassword(User user)
Parameters
Type |
Name |
Description |
User |
user |
The user.
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
Task.
|
Declaration
void SetTypedUserSetting(long userId, string key, object configuration)
Parameters
Type |
Name |
Description |
System.Int64 |
userId |
|
System.String |
key |
|
System.Object |
configuration |
|
Declaration
void SetUserSettings(long userId, NameValuePair[] settings)
Parameters
Type |
Name |
Description |
System.Int64 |
userId |
|
NameValuePair[] |
settings |
|
Starts the forgot password process.
Declaration
Task<ForgotPasswordResult> StartForgotPasswordProcess(string enteredUsername, bool isInNetwork, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
enteredUsername |
|
System.Boolean |
isInNetwork |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Declaration
void UpdateConfiguration(User user, UserConfiguration newConfiguration)
Parameters
Updates the configuration.
Declaration
void UpdateConfiguration(long userId, UserConfiguration newConfiguration)
Parameters
Type |
Name |
Description |
System.Int64 |
userId |
The user identifier.
|
UserConfiguration |
newConfiguration |
The new configuration.
|
Declaration
void UpdateUser(User user)
Parameters
Type |
Name |
Description |
User |
user |
The user.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
user
|
System.ArgumentException |
|
Declaration
void UpdateUser(User user, bool triggerEvent)
Parameters
Type |
Name |
Description |
User |
user |
|
System.Boolean |
triggerEvent |
|
Declaration
void UpdateUserPolicy(long userId, UserPolicy userPolicy)
Parameters
Type |
Name |
Description |
System.Int64 |
userId |
The user identifier.
|
UserPolicy |
userPolicy |
The user policy.
|
Events
Declaration
event EventHandler<GenericEventArgs<User>> UserConfigurationUpdated
Event Type
Declaration
event EventHandler<GenericEventArgs<User>> UserCreated
Event Type
Occurs when [user deleted].
Declaration
event EventHandler<GenericEventArgs<User>> UserDeleted
Event Type
Declaration
event EventHandler<GenericEventArgs<User>> UserLockedOut
Event Type
Declaration
event EventHandler<GenericEventArgs<User>> UserPasswordChanged
Event Type
Declaration
event EventHandler<GenericEventArgs<User>> UserPolicyUpdated
Event Type
Occurs when [user updated].
Declaration
event EventHandler<GenericEventArgs<User>> UserUpdated
Event Type
Extension Methods