View Source
Interface IUserRepository
Assembly: Umbraco.Core.dll
Syntax
public interface IUserRepository : IReadWriteQueryRepository<Guid, IUser>, IReadRepository<Guid, IUser>, IWriteRepository<IUser>, IQueryRepository<IUser>, IRepository
Methods
View Source
AddClientId(Int32, String)
Declaration
void AddClientId(int id, string clientId)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.String |
clientId |
|
View Source
ClearLoginSession(Guid)
Declaration
void ClearLoginSession(Guid sessionId)
Parameters
Type |
Name |
Description |
Guid |
sessionId |
|
View Source
ClearLoginSessions(Int32)
Declaration
int ClearLoginSessions(int userId)
Parameters
Type |
Name |
Description |
System.Int32 |
userId |
|
Returns
Type |
Description |
System.Int32 |
|
View Source
ClearLoginSessions(TimeSpan)
Declaration
int ClearLoginSessions(TimeSpan timespan)
Parameters
Type |
Name |
Description |
TimeSpan |
timespan |
|
Returns
Type |
Description |
System.Int32 |
|
View Source
CreateLoginSession(Nullable<Int32>, String, Boolean)
Declaration
Guid CreateLoginSession(int? userId, string requestingIpAddress, bool cleanStaleSessions = true)
Parameters
Type |
Name |
Description |
System.Nullable<System.Int32> |
userId |
|
System.String |
requestingIpAddress |
|
System.Boolean |
cleanStaleSessions |
|
Returns
View Source
ExistsByLogin(String)
Checks if a user with the login exists
Declaration
bool ExistsByLogin(string login)
Parameters
Type |
Name |
Description |
System.String |
login |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
ExistsByUserName(String)
Checks if a user with the username exists
Declaration
bool ExistsByUserName(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Get(Int32)
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
Get(Nullable<Int32>, Boolean)
Declaration
IUser Get(int? id, bool includeSecurityData)
Parameters
Type |
Name |
Description |
System.Nullable<System.Int32> |
id |
|
System.Boolean |
includeSecurityData |
This is only used for a shim in order to upgrade to 7.7
|
Returns
Type |
Description |
IUser |
A non cached IUser instance
|
View Source
GetAllClientIds()
Declaration
IEnumerable<string> GetAllClientIds()
Returns
Type |
Description |
IEnumerable<System.String> |
|
View Source
GetAllInGroup(Int32)
Gets a list of IUser objects associated with a given group
Declaration
IEnumerable<IUser> GetAllInGroup(int groupId)
Parameters
Type |
Name |
Description |
System.Int32 |
groupId |
Id of group
|
Returns
Type |
Description |
IEnumerable<IUser> |
|
View Source
GetAllNotInGroup(Int32)
Gets a list of IUser objects not associated with a given group
Declaration
IEnumerable<IUser> GetAllNotInGroup(int groupId)
Parameters
Type |
Name |
Description |
System.Int32 |
groupId |
Id of group
|
Returns
Type |
Description |
IEnumerable<IUser> |
|
View Source
GetByClientId(String)
Declaration
IUser GetByClientId(string clientId)
Parameters
Type |
Name |
Description |
System.String |
clientId |
|
Returns
View Source
GetByUsername(String, Boolean)
Returns a user by username
Declaration
IUser GetByUsername(string username, bool includeSecurityData)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.Boolean |
includeSecurityData |
This is only used for a shim in order to upgrade to 7.7
|
Returns
Type |
Description |
IUser |
A non cached IUser instance
|
View Source
GetClientIds(Int32)
Declaration
IEnumerable<string> GetClientIds(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
IEnumerable<System.String> |
|
View Source
GetCountByQuery(IQuery<IUser>)
Gets the count of items based on a complex query
Declaration
int GetCountByQuery(IQuery<IUser> query)
Parameters
Returns
Type |
Description |
System.Int32 |
|
View Source
GetForUpgrade(Int32)
Gets a user for upgrade purposes, this will only return a result if the current runtime state is upgrade.
Declaration
virtual IUser GetForUpgrade(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
The id to find the user by.
|
Returns
Type |
Description |
IUser |
An uncached IUser instance.
|
View Source
GetForUpgradeByEmail(String)
Gets a user by email for upgrade purposes, this will only return a result if the current runtime state is upgrade.
Declaration
virtual IUser GetForUpgradeByEmail(string email)
Parameters
Type |
Name |
Description |
System.String |
email |
The email to find the user by.
|
Returns
Type |
Description |
IUser |
An uncached IUser instance.
|
View Source
GetForUpgradeByUsername(String)
Gets a user by username for upgrade purposes, this will only return a result if the current runtime state is upgrade.
Declaration
virtual IUser GetForUpgradeByUsername(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
The username to find the user by.
|
Returns
Type |
Description |
IUser |
An uncached IUser instance.
|
View Source
GetPagedResultsByQuery(IQuery<IUser>, Int64, Int32, out Int64, Expression<Func<IUser, Object>>, Direction, String[], String[], UserState[], IQuery<IUser>)
Declaration
IEnumerable<IUser> GetPagedResultsByQuery(IQuery<IUser> query, long pageIndex, int pageSize, out long totalRecords, Expression<Func<IUser, object>> orderBy, Direction orderDirection = Direction.Ascending, string[] includeUserGroups = null, string[] excludeUserGroups = null, UserState[] userState = null, IQuery<IUser> filter = null)
Parameters
Type |
Name |
Description |
IQuery<IUser> |
query |
|
System.Int64 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int64 |
totalRecords |
|
System.Linq.Expressions.Expression<Func<IUser, System.Object>> |
orderBy |
|
Direction |
orderDirection |
|
System.String[] |
includeUserGroups |
A filter to only include user that belong to these user groups
|
System.String[] |
excludeUserGroups |
A filter to only include users that do not belong to these user groups
|
UserState[] |
userState |
Optional parameter to filter by specified user state
|
IQuery<IUser> |
filter |
|
Returns
Type |
Description |
IEnumerable<IUser> |
|
View Source
GetProfile(Int32)
Declaration
IProfile GetProfile(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetProfile(String)
Declaration
IProfile GetProfile(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
Returns
View Source
GetUserStates()
Declaration
IDictionary<UserState, int> GetUserStates()
Returns
Type |
Description |
IDictionary<UserState, System.Int32> |
|
View Source
RemoveClientId(Int32, String)
Declaration
bool RemoveClientId(int id, string clientId)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.String |
clientId |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
ValidateLoginSession(Int32, Guid)
Declaration
bool ValidateLoginSession(int userId, Guid sessionId)
Parameters
Type |
Name |
Description |
System.Int32 |
userId |
|
Guid |
sessionId |
|
Returns
Type |
Description |
System.Boolean |
|