[eluser]pickupman[/eluser]
You have two options:
1. Add a variable to the js for rabidratings. It has a few default options declared at lines 22-27.
2. When the rating is posted to your controller or library just use the session class or your auth library to add a user id.
On a side note, any particular reason for not using CI's active record (db) class? You are using plain queries.