[Bug 880793] De-coupled user model access from the database logic