extract method for flagging users

continue migrating code to the service.