// UserExists allows to know if a user exists through his mail
UserExists allows to know if a user exists through his mail
// UserExists allows to know if a user exists through his mail
func (db *Postgres) UserExists(userEmail string) (bool, *models.User, error) {
	var user models.User
	if err := db.Where("email = ?", userEmail).First(&user).Error; err == nil {
		return true, &user, nil
	}
	return false, nil, nil
}
func ( db * Postgres ) UserExists ( userEmail string ) ( bool , * models . User , error ) { var user models . User if err := db . Where ( " " , userEmail ) . First ( & user ) . Error ; err == nil { return true , & user , nil } return false , nil , nil }
UserExists allows to know if a user exists through his mail
UserExists allows to know if a user exists through his mail