IUserManager Interface
Provides the APIs for managing users in the database.
Syntax
Unit: Sphinx.UserManager
IUserManager = interface(IInterface);
Methods
| Name | Description |
|---|---|
| AccessFailed | Notifies a failed user login, incrementing the access failed count. |
| AddPassword | Adds a new password for a user, if there is no current password set. |
| BeginResetPassword | Exchanges a password reset token by a change password token. |
| ChangeEmail | Changes the user email, using the provided email change token. |
| ChangePassword | Changes the user password to a new value, using the provided password change token. |
| ChangePhoneNumber | Changes the user phone number, using the provided phone number change token. |
| CheckPassword | Returns a boolean value indicating if Password is the correct password for the specified User. |
| ConfirmEmail | Sets the user e-mail as confirmed, using the provided confirmation token. |
| ConfirmPhoneNumber | Sets the user phone number as confirmed, using the provided confirmation token. |
| CreateUser | Overloaded CreateUser(TUser) CreateUser(TUser, string) |
| CreateUserInstance | Creates a new user object instance. |
| DeleteUser | Deletes the specified user from the database. |
| 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. |
| 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. |
| 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. |
| GenerateChangeEmailToken | Generates an email change token that should be used to change the e-mail of a user. |
| GenerateChangePhoneNumberToken | Generates a phone number change token that should be used to change the phone number of a user. |
| GenerateEmailConfirmationToken | Generates an email confirmation token that should be used to set the email as confirmed. |
| GeneratePasswordChangeToken | Generates a password change token that should be used to change the user password. |
| GeneratePasswordResetToken | Generates a password reset token that should be used to reset the user password. |
| GeneratePhoneNumberConfirmationToken | Generates a phone number confirmation token that should be used to set the phone number as confirmed. |
| GenerateUserToken | Generates a token for the given user and purpose. |
| GetAuthenticationToken | Returns an authentication token for a user from the database. |
| GetAuthenticatorKey | Returns the authenticator key for the user. |
| GetTwoFactorEnabled | Returns 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. |
| IsLockedOut | Returns a flag indicating whether the specified user is locked out. |
| RemoveAuthenticationToken | Removes an authentication token for a user from the database. |
| ResetAccessFailedCount | Resets the access failed count to zero for the specified user. |
| ResetAuthenticatorKey | Resets the authenticator key for the user. |
| SetAuthenticationToken | Saves an authentication token for a user in the database. |
| SetTwoFactorEnabled | Sets a flag indicating whether the specified user has two factor authentication enabled or not. |
| 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. |
| UpdateUser | Updates the specified user in the database. |
| VerifyTwoFactorToken | Verifies the specified two factor authentication token for the given user. |
| VerifyUserToken | Returns a flag indicating whether the specified token is valid for the given user and purpose. |