0

I am trying to figure out how to modify Laravel (v8) Fortify's logic when looking up which user has requested a password reset. Due to the nature of our application, a user can have 2 records in the users table - one with a user_type of "creator" and one with a user_type of "player".

Currently, if a user has registered as a "player" before registering as a "creator", Fortify will reset the password of the "player" record and ignore the "creator" one. However, as players can reset their passwords elsewhere, this process should only be concerned with "creator" records.

Does anybody know how to force Fortify to do a lookup on the user_type field as well as the default email field when finding the appropriate user?

TIA!

4
  • you mean you need two passwords right? Commented Nov 13, 2023 at 15:27
  • if yes, you can save your password smoewhere else . for example you can create a new model name UserSimulate . it may has some columns... like : player_password , creator_password ... you can bycrypt and decrypt them... Commented Nov 13, 2023 at 15:31
  • Users may have 2 accounts in the users table, with different passwords potentially. I'd like to keep the passwords in the users table ideally, I can't see the need to separate them. Commented Nov 13, 2023 at 15:59
  • 1
    For the record, I found the answer here: stackoverflow.com/a/55912660/2917183 - thank you to @BahdCoder Commented Nov 13, 2023 at 21:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.