Pushing for help on Collaborators

Hi Miki,

I am clearly doing something wrong - but cannot quite figure out what exactly. 

What I am trying to achieve with the code as it is right now is to: 
1. Write the ID of the new collaborator and the wiki back to the collaborators DB and assign the "allowed" role.
2. Then assign the permissions so that a collaborator sees his/her own wikis plus those they can collaborate on.

I spent some time with the Office hours folks a few nights back and probably another 5-6 hours yesterday and today to get to here. 

Can you please take a look and help me correct what I am doing wrong when you have a chance.

-K