The idea is for the logged in user to be able to consult his payments in the universities system. The staff would fill-in a user profile field with the users ID number in the schools payment system and the yii app would use the profile field number to run the query on the billing table for the users last 10 payments.
I'm sure there must be a guide already written on this. I'm sure I'm not the first person who would like to use moodle variable in other applications.