I don't understand where the problem is. You try to save a new User, but it breaks data integrity because the PK already exists. So it should throw an exception and rollback.
First, why have a PK that is manually entered and has some meaning to it. Usually a PK is unique and has no meaning like an autoincrementing field that just has some int in it.
What DB tech are your using in your DAO, is it
JDBC, ORM??? If it is ORM like Hibernate you can call session.saveOrUpdate and Hibernate will know to try to do an update statement instead of insert and you won't get an exception. Of if JDBC, write logic to check if the login already exists, if it does then don't run the insert. If it doesn't then run the insert.
Mark