PasswordResetService Class
Provides interactions with topics
Constructor
PasswordResetService
-
context
Parameters:
-
contextObject-
siteString -
onlyThisSiteBoolean -
userServiceUserService -
siteServiceSiteService -
emailServiceEmailService
-
Methods
_emit
-
event -
data -
cb
Parameters:
-
eventString -
dataObject -
cbFunction
_get
-
id -
[options] -
cb
Parameters:
-
idString -
[options]Object optional -
cbFunction
_retrieveOnUpdateAndMerge
-
dto -
options -
cb
Parameters:
-
dtoObject -
optionsObject-
[isCreate]Boolean optional
-
-
cbFunction
add
-
dto -
[options] -
cb
Parameters:
-
dtoObject -
[options]Object optional -
cbFunctionA 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:
-
contextObject-
servicePasswordResetServiceAn instance of the service that triggered the event that called this handler
-
-
cbFunctionA callback that takes a single parameter: an error if occurred
addIfNotExists
-
usernameOrEmail -
cb
Parameters:
-
usernameOrEmailString -
cbFunction(Error, {created: boolean, data: {}})
-
context -
cb
Parameters:
-
contextObject-
servicePasswordResetServiceAn instance of the service that triggered the event that called this handler
-
-
cbFunctionA callback that takes a single parameter: an error if occurred
count
-
[options] -
cb
Parameters:
-
[options]Object optional-
[where]Object optional
-
-
cbFunctionA 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:
-
idString -
optionsObject -
cbFunction
deleteSingle
-
[options] -
cb
Parameters:
-
[options]Object optionalSee BaseObjectService#getSingle-
[where]Object optional
-
-
cbFunction
get
-
id -
[options] -
cb
Parameters:
-
idString -
[options]Object optional -
cbFunction(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
-
-
cbFunctionA 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
-
-
cbFunctionA 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:
-
dtoObject
Returns:
getSingle
-
[options] -
cb
Parameters:
-
[options]Object optional-
[select]Object optional -
[where]Object optional -
[order]Array optional -
[offset]Integer optional
-
-
cbFunctionA 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:
-
dtoObject -
[options]Object optional-
[isCreate]Boolean optional
-
-
cbFunctionA 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:
-
userObjectA user object
-
passwordResetObjectA password reset object containing the verification code
-
cbFunction(Error)
update
-
dto -
[options] -
cb
Parameters:
-
dtoObject -
[options]Object optional -
cbFunctionA 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:
-
contextObject-
dataObject -
validationErrorsArray
-
-
cbFunction
Returns:
validate
-
context -
cb
Parameters:
-
contextObject-
dataObjectThe DTO that was provided for persistence
-
servicePasswordResetServiceAn instance of the service that triggered the event that called this handler
-
-
cbFunctionA callback that takes a single parameter: an error if occurred
