UserService.Get Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Overloads

Get(IEnumerable, bool, bool) Gets a list of User objects from the repository.
Get(int, bool, bool) Gets a User object from the repository.
Get(string, bool, bool) Gets the User with the specified username.
Get(string, string) Gets the User with the specified username/email and password.

Get(IEnumerable, bool, bool)

Gets a list of User objects from the repository.

public static IEnumerable<User> Get(IEnumerable<int> ids, bool sudo = false, bool trashed = false)

Parameters

ids
System.Collections.Generic.IEnumerable

Ids of the users to get.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to include trashed users, otherwise false.

Returns

System.Collections.Generic.IEnumerable

Returns a list of User objects.

Get(int, bool, bool)

Gets a User object from the repository.

public static User Get(int id, bool sudo = false, bool trashed = false)

Parameters

id
int

If of user to get.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return user even if trashed, otherwise false.

Returns

User

Returns an instance of the User class.

Get(string, bool, bool)

Gets the User with the specified username.

public static User Get(string username, bool sudo = false, bool trashed = false)

Parameters

username
string

The username of the user.

sudo
bool

true to perform action as super user, otherwise false.

trashed
bool

true to return user even if trashed, otherwise false.

Returns

User

Returns an instance of the User class.

Get(string, string)

Gets the User with the specified username/email and password.

public static User Get(string username, string password)

Parameters

username
string

The username or email of the User. Not case sensitive.

password
string

The password for the User. This is case sensitive.

Returns

User

Returns an instance of the User class.