IUserManager Interface
Provides the APIs for managing users in the database.
Syntax
Unit: Sphinx.UserManager
IUserManager = interface(IInterface);
Methods
Name | Description |
---|---|
CreateUser | Overloaded CreateUser(TUser) CreateUser(TUser, string) |
UpdateUser | Updates the specified user in the database. |
DeleteUser | Deletes the specified user from the database. |
FindById | Retrieves the user with the provided id, or nil if no user is found. |
FindByName | Retrieves the user with the specified user name, or nil if no user is found. |
FindByEmail | Retrieves the user with the specified e-mail, or nil if no user is found. If two or more users are found with same e-mail, an exception will be raised, that is why you should only call this method if RequireUniqueEmail is set to true in options. found. |
FindByPhoneNumber | Retrieves the user with the specified phone number, or nil if no user is found. If two or more users are found with same phone number, an exception will be raised. |
CheckPassword | Returns a boolean value indicating if Password is the correct password for the specified User. |
GenerateEmailConfirmationToken | Generates an email confirmation token that should be used to set the email as confirmed. |
ConfirmEmail | Sets the user e-mail as confirmed, using the provided confirmation token. |
GeneratePhoneNumberConfirmationToken | Generates a phone number confirmation token that should be used to set the phone number as confirmed. |
ConfirmPhoneNumber | Sets the user phone number as confirmed, using the provided confirmation token. |
GeneratePasswordResetToken | Generates a password reset token that should be used to reset the user password. |
BeginResetPassword | Exchanges a password reset token by a change password token. |
GeneratePasswordChangeToken | Generates a password change token that should be used to change the user password. |
ChangePassword | Changes the user password to a new value, using the provided password change token. |
GenerateChangeEmailToken | Generates an email change token that should be used to change the e-mail of a user. |
ChangeEmail | Changes the user email, using the provided email change token. |
GenerateChangePhoneNumberToken | Generates a phone number change token that should be used to change the phone number of a user. |
ChangePhoneNumber | Changes the user phone number, using the provided phone number change token. |
IsLockedOut | Returns a flag indicating whether the specified user is locked out. |
AccessFailed | Notifies a failed user login, incrementing the access failed count. |
ResetAccessFailedCount | Resets the access failed count to zero for the specified user. |
AddPassword | Adds a new password for a user, if there is no current password set. |
GenerateUserToken | Generates a token for the given user and purpose. |
VerifyUserToken | Returns a flag indicating whether the specified token is valid for the given user and purpose. |
SetAuthenticationToken | Saves an authentication token for a user in the database. |
GetAuthenticationToken | Returns an authentication token for a user from the database. |
RemoveAuthenticationToken | Removes an authentication token for a user from the database. |
VerifyTwoFactorToken | Verifies the specified two factor authentication token for the given user. |
GetTwoFactorEnabled | Returns a flag indicating whether the specified user has two factor authentication enabled or not. |
SetTwoFactorEnabled | Sets a flag indicating whether the specified user has two factor authentication enabled or not. |
GetTwoFactorRequired | Returns a flag indicating whether the specified user has two factor authentication required for login. |
SetTwoFactorRequired | Sets a flag indicating whether the specified user must use two factor authentication to login. A null value means the default behavior will be used. |
GetAuthenticatorKey | Returns the authenticator key for the user. |
ResetAuthenticatorKey | Resets the authenticator key for the user. |
CreateUserInstance | Creates a new user object instance. |