UserService Class

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

Service layer for User and Role objects.

public static class UserService
Inheritance:
System.Object → UserService

Fields

Anonymous Gets the Anonymous user.
AnonymousId The Id of the Anonymous user (-1).
SystemId The Id of the System user (-2).

Methods

ChangePassword(int, string, string) Updates the password for the User.
Delete(int, bool) Permanently deletes the User from the repository.
GeneratePassword(int, bool, bool, bool, bool) Generates a random password.
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.
GetByEmail(string, bool, bool) Gets the User with the specified email address.
GetByGuid(Guid, bool, bool) Gets the User with the specified guid.
GetByToken(string, bool, bool, bool) Gets the User with the specified token.
GetClient(string, bool, bool) Get user by clientId.
GetClient(string, string) Gets the User with the specified username/email and password.
GetClients(UserQuery) Gets all clients (i.e. users with ClientId and ClientSecret properties).
GetFollowers(IEntity, QueryOptions) Get users that follow the specified entity.
GetFollowing(User, Query) Get users that the specified user is following.
GetLastSeen(int) Gets a System.DateTime object indicating when the specified User was last seen.
GetLikers(IEntity, QueryOptions) Get users that likes the specified entity.
GetMentioned(IEntity, QueryOptions) Gets users that is @mentioned in the specified entity.
GetPresence(int) Return the current presence of a user.
GetStarrers(IEntity, QueryOptions) Gets users that have starred the specified entity.
Insert(User, string, bool) Inserts a User into the repository.
MakeUniqueUsername(String[]) Helper method for getting a unique username among users and spaces.
ResetPassword(int, string, string, bool) Resets a user's password.
Restore(int, bool) Restores a trashed User, i.e. clears the IsTrashed flag.
Search(UserQuery) Performs a search according to the specified UserQuery object.
SetPassword(int, string, bool) Set a new password for the specified user.
Trash(int, bool) Trash a User, i.e. sets the IsTrashed flag.
Update(User, bool) Updates an existing User in the datasource.