How to tell the user email already exists and if that email address belongs to you then reset the password

I need to show a message to the user if the user tries to create an account and that email address already is taken and if that email address belongs to the user then reset the password for the account associated with that email address.

There might be some case this could happen.

  • User creates an account before and forgot that
  • Someone has uses there an email address to create an account