Class UserService
- Namespace
- Dynamicweb.Security.User
Management
- Assembly
- Dynamicweb.Core.dll
- Inheritance
-
User
Service
- Implements
- Inherited Members
Methods
AddGroupRelations(User, IEnumerable<UserGroup>)
Parameters
user
Usergroups
IEnumerable<UserGroup >
ApproveUser(string, out User?)
Finds a user with matching Approval
Parameters
Returns
- bool
true
, if approval succeeded; otherwise,false
.
ChangePassword(User, string)
Changes the user password.
Parameters
ClearCache()
Resets all keys to the default value for objects stored in the object cache
Delete(User)
Deletes a user
Parameters
user
UserUser to delete
ExpirePasswordRecoveryToken(User)
Expires password recovery token.
Parameters
user
User
GetUserByEmailAddress(string)
Finds a user by email address.
Parameters
emailAddress
stringUser email address to search for.
Returns
GetUserByEmailAddress(string, string?)
Finds a user by email address and shop id.
Parameters
Returns
GetUserByExternalId(string)
Finds a user by external id.
Parameters
externalId
stringExternal identifier to search for.
Returns
GetUserById(int)
Gets a user by id.
Parameters
id
intIdentifier of a user to be retrieved.
Returns
GetUserByRecoveryToken(string)
Finds a user by recovery token.
Parameters
recoveryToken
stringRecovery token to search for.
Returns
GetUserByUniqueId(Guid)
Finds a user by unique id.
Parameters
uniqueId
GuidUnique identifier to search for.
Returns
GetUserByUserName(string)
Finds a user by username.
Parameters
username
stringUsername to search for.
Returns
GetUserByUserName(string, string?)
Finds a user by username and shop id.
Parameters
Returns
GetUserCountByGroupId(int)
Gets the number of users associated with a given user group.
Parameters
groupId
intIdentifier of a user group.
Returns
GetUserIdsByGroupId(IEnumerable<int>)
Gets user the ids associated with given user group ids.
Parameters
groupIds
IEnumerable<int>Identifiers of user groups.
Returns
GetUserIdsByGroupId(int)
Gets user the ids associated with a given user group id.
Parameters
groupId
intIdentifier of a user group.
Returns
GetUsersByCustomerNumber(string)
Gets users by customer number.
Parameters
customerNumber
stringCustomer number of users to be retrieved.
Returns
GetUsersByGroupId(IEnumerable<int>)
Gets users by group id.
Parameters
groupIds
IEnumerable<int>Identifiers of user groups.
Returns
GetUsersByGroupId(int)
Gets users by group id.
Parameters
groupId
intIdentifier of a user group.
Returns
GetUsersById(IEnumerable<int>)
Gets users by id.
Parameters
ids
IEnumerable<int>Identifiers of users to be retrieved.
Returns
GetUsersBySearch(UserSearchFilter)
Gets users by search filters provided.
Parameters
searchFilter
UserSearch Filter The search filters.
Returns
IsValidUserName(User)
Checks if the username is valid for a given user.
Parameters
user
User
Returns
- bool
True if the username is non-empty and not taken by another user, false otherwise
RemoveGroupRelations(User)
Parameters
user
User
RemoveGroupRelations(User, IEnumerable<UserGroup>)
Parameters
user
Usergroups
IEnumerable<UserGroup >
Save(User)
Saves a user
Parameters
user
UserUser to save
Returns
- bool
true
, if user is saved; otherwise,false
Remarks
User is not saved if username is not unique. Use Is
UpdateEmailAllowed(IEnumerable<User>, bool)
Parameters
users
IEnumerable<User>emailAllowed
bool
UpdateInformationSentDate(IEnumerable<User>, DateTime)
Parameters
users
IEnumerable<User>informationSentDate
DateTime