PasswordResetService Class
Provides interactions with topics
Constructor
PasswordResetService
-
context
Parameters:
-
context
Object-
site
String -
onlyThisSite
Boolean -
userService
UserService -
siteService
SiteService -
emailService
EmailService
-
Methods
_emit
-
event
-
data
-
cb
Parameters:
-
event
String -
data
Object -
cb
Function
_get
-
id
-
[options]
-
cb
Parameters:
-
id
String -
[options]
Object optional -
cb
Function
_retrieveOnUpdateAndMerge
-
dto
-
options
-
cb
Parameters:
-
dto
Object -
options
Object-
[isCreate]
Boolean optional
-
-
cb
Function
add
-
dto
-
[options]
-
cb
Parameters:
-
dto
Object -
[options]
Object optional -
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
-
context
-
cb
Parameters:
-
context
Object-
service
PasswordResetServiceAn instance of the service that triggered the event that called this handler
-
-
cb
FunctionA callback that takes a single parameter: an error if occurred
addIfNotExists
-
usernameOrEmail
-
cb
Parameters:
-
usernameOrEmail
String -
cb
Function(Error, {created: boolean, data: {}})
-
context
-
cb
Parameters:
-
context
Object-
service
PasswordResetServiceAn instance of the service that triggered the event that called this handler
-
-
cb
FunctionA callback that takes a single parameter: an error if occurred
count
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[where]
Object optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the number of results that match the specified query
deleteById
-
id
-
options
-
cb
Parameters:
-
id
String -
options
Object -
cb
Function
deleteSingle
-
[options]
-
cb
Parameters:
-
[options]
Object optionalSee BaseObjectService#getSingle-
[where]
Object optional
-
-
cb
Function
get
-
id
-
[options]
-
cb
Parameters:
-
id
String -
[options]
Object optional -
cb
Function(Error, object|null) A callback that takes two parameters. The first is an error, if occurred. The second is the object with the specified ID
getAll
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[select]
Object optional -
[where]
Object optional -
[order]
Array optional -
[limit]
Integer optional -
[offset]
Integer optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is an array representing the results of the query.
getAllWithCount
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[select]
Object optional -
[where]
Object optional -
[order]
Array optional -
[limit]
Integer optional -
[offset]
Integer optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is an object representing the results of the query.
getContext
-
[data]
Parameters:
-
[data]
String | Object | Number | Boolean optional
Returns:
getIdWhere
-
dto
Parameters:
-
dto
Object
Returns:
getSingle
-
[options]
-
cb
Parameters:
-
[options]
Object optional-
[select]
Object optional -
[where]
Object optional -
[order]
Array optional -
[offset]
Integer optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
getType
()
String
Returns:
save
-
dto
-
[options]
-
cb
Parameters:
-
dto
Object -
[options]
Object optional-
[isCreate]
Boolean optional
-
-
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
sendPasswordResetEmail
-
user
-
passwordReset
-
cb
Sends a password reset email to a user
Parameters:
-
user
ObjectA user object
-
passwordReset
ObjectA password reset object containing the verification code
-
cb
Function(Error)
update
-
dto
-
[options]
-
cb
Parameters:
-
dto
Object -
[options]
Object optional -
cb
FunctionA callback that takes two parameters. The first is an error, if occurred. The second is the object that matches the specified query
validate
-
context
-
cb
Parameters:
-
context
Object-
data
Object -
validationErrors
Array
-
-
cb
Function
Returns:
validate
-
context
-
cb
Parameters:
-
context
Object-
data
ObjectThe DTO that was provided for persistence
-
service
PasswordResetServiceAn instance of the service that triggered the event that called this handler
-
-
cb
FunctionA callback that takes a single parameter: an error if occurred