#Filter hook to update pass and get login doesnt work properly.

1 messages · Page 1 of 1 (latest)

lavish socket
#

I did this to test the filter hook and see if it is able to update the password of a user if it is null. and it does it but on the second try. could someone help me by telling me what is missing to get it on the first try.

frosty gorgeBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

steady iron
#

Are you awaiting the update call in makeHttpPostRequest?

strange oyster
#

Are you logging into an external system using a http request in this hook? if not you should probably stick with the services that talk directly to the database over making a http request

lavish socket
strange oyster
#

Ah, then where is this userDirectusTen[0].id coming from? should that not be either the email from the original login or the email returned from directus 8?

#

Hmmm i kinda want to close this duplicate in favor of the one in help-extensions as that seems like the most appropriate place 🤔 however that got no interaction on it

#

So i removed the other one with the question here to please not re-post the same question in multiple channels

lavish socket
#

I delete it, from const userDirectusTen = await itemsService.readByQuery({ filter: { email: { _eq: input.email } } }) , get the array of the user [id:]

strange oyster
#

ah ok