Class UserManager
- Namespace
- Oqtane.Managers
- Assembly
- Oqtane.Server.dll
public class UserManager : IUserManager
- Inheritance
-
UserManager
- Implements
-
Constructors
UserManager(IUserRepository, IRoleRepository, IUserRoleRepository, UserManager<IdentityUser>, SignInManager<IdentityUser>, ITenantManager, INotificationRepository, IFolderRepository, IProfileRepository, ISettingRepository, ISiteRepository, ISyncManager, ILogManager, IMemoryCache, IStringLocalizer<UserManager>)
public UserManager(IUserRepository users, IRoleRepository roles, IUserRoleRepository userRoles, UserManager<IdentityUser> identityUserManager, SignInManager<IdentityUser> identitySignInManager, ITenantManager tenantManager, INotificationRepository notifications, IFolderRepository folders, IProfileRepository profiles, ISettingRepository settings, ISiteRepository sites, ISyncManager syncManager, ILogManager logger, IMemoryCache cache, IStringLocalizer<UserManager> localizer)
Parameters
users
IUserRepository
roles
IRoleRepository
userRoles
IUserRoleRepository
identityUserManager
UserManager<IdentityUser>
identitySignInManager
SignInManager<IdentityUser>
tenantManager
ITenantManager
notifications
INotificationRepository
folders
IFolderRepository
profiles
IProfileRepository
settings
ISettingRepository
sites
ISiteRepository
syncManager
ISyncManager
logger
ILogManager
cache
IMemoryCache
localizer
IStringLocalizer<UserManager>
Methods
AddUser(User)
public Task<User> AddUser(User user)
Parameters
user
User
Returns
- Task<User>
DeleteUser(int, int)
public Task DeleteUser(int userid, int siteid)
Parameters
userid
int
siteid
int
Returns
- Task
ForgotPassword(User)
public Task ForgotPassword(User user)
Parameters
user
User
Returns
- Task
GetUser(int, int)
public User GetUser(int userid, int siteid)
Parameters
userid
int
siteid
int
Returns
- User
GetUser(string, int)
public User GetUser(string username, int siteid)
Parameters
username
string
siteid
int
Returns
- User
GetUser(string, string, int)
public User GetUser(string username, string email, int siteid)
Parameters
username
string
email
string
siteid
int
Returns
- User
ImportUsers(int, string, bool)
public Task<Dictionary<string, string>> ImportUsers(int siteId, string filePath, bool notify)
Parameters
siteId
int
filePath
string
notify
bool
Returns
- Task<Dictionary<string, string>>
LinkExternalAccount(User, string, string, string, string)
public Task<User> LinkExternalAccount(User user, string token, string type, string key, string name)
Parameters
user
User
token
string
type
string
key
string
name
string
Returns
- Task<User>
LoginUser(User, bool, bool)
public Task<User> LoginUser(User user, bool setCookie, bool isPersistent)
Parameters
user
User
setCookie
bool
isPersistent
bool
Returns
- Task<User>
LogoutUserEverywhere(User)
public Task LogoutUserEverywhere(User user)
Parameters
user
User
Returns
- Task
ResetPassword(User, string)
public Task<User> ResetPassword(User user, string token)
Parameters
user
User
token
string
Returns
- Task<User>
UpdateUser(User)
public Task<User> UpdateUser(User user)
Parameters
user
User
Returns
- Task<User>
ValidatePassword(string)
public Task<bool> ValidatePassword(string password)
Parameters
password
string
Returns
- Task<bool>
VerifyEmail(User, string)
public Task<User> VerifyEmail(User user, string token)
Parameters
user
User
token
string
Returns
- Task<User>
VerifyTwoFactor(User, string)
public User VerifyTwoFactor(User user, string token)
Parameters
user
User
token
string
Returns
- User