Fixed users deleting and name editing.

This fixes pub keys removing when user was deleted or renamed.

Signed-off-by: Kristián Feldsam <feldsam@gmail.com>