R: [Users] using AVPs to write into database