User deleting and renaming fix

This fixes pub keys removing when user was deleted or renamed.

Signed-off-by: Kristián Feldsam <feldsam@gmail.com>