// UserExistsWithEmail checks for a user with the given email address. If one exists, it returns the ID of that user.
UserExistsWithEmail checks for a user with the given email address. If one exists, it returns the ID of that user.
// UserExistsWithEmail checks for a user with the given email address . If one exists it returns the ID of that user .
func UserExistsWithEmail(email string) (bool, int, error) {
	rows, err := DB.Query("SELECT id FROM users WHERE email = ?", email)
	if err != nil {
		return false, -1, err
	}
	defer rows.Close()
	if rows.Next() {
		id := -1
		err = rows.Scan(&id)
		if err != nil {
			return false, -1, err
		}
		return true, id, nil
	}
	return false, -1, nil
}
func UserExistsWithEmail ( email string ) ( bool , int , error ) { rows , err := DB . Query ( " " , email ) if err != nil { return false , - 1 , err } defer rows . Close ( ) if rows . Next ( ) { id := - 1 err = rows . Scan ( & id ) if err != nil { return false , - 1 , err } return true , id , nil } return false , - 1 , nil }
UserExistsWithEmail checks for a user with the given email address.
UserExistsWithEmail checks for a user with the given email address .