View Source
Interface IUserRepository
Assembly: Umbraco.Core.dll
Syntax
public interface IUserRepository : IReadWriteQueryRepository<int, IUser>, IReadRepository<int, IUser>, IWriteRepository<IUser>, IQueryRepository<IUser>, IRepository
Methods
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
Exists(String)
Checks if a user with the username exists
Declaration
bool Exists(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
Returns
Type |
Description |
System.Boolean |
|
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(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
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
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
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
GetNextUsers(Int32, Int32)
Declaration
IEnumerable<IUser> GetNextUsers(int id, int count)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int32 |
count |
|
Returns
Type |
Description |
IEnumerable<IUser> |
|
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
ValidateLoginSession(Int32, Guid)
Declaration
bool ValidateLoginSession(int userId, Guid sessionId)
Parameters
Type |
Name |
Description |
System.Int32 |
userId |
|
Guid |
sessionId |
|
Returns
Type |
Description |
System.Boolean |
|