PPL

Comment 10 for bug 708213

Revision history for this message
Brad Phillips (brad-bradphillips) wrote :

Ok, so I've been able to get this to work, but it's still in early stages & buggy.

So, the 'invite user' link on a contacts profile page now links to a widget I created called "invite_user_test". In this widget, I've inserted an add form (37) that adds a new record to the newly created ppl_invites table. It currently records the recipient_id, the sender_id, the e-mail to send to, a random key, and a message. When you load the page, you can add a message & an e-mail address & the invitation is successfully sent to the supplied e-mail, along with a link to accept the invitation.

I've also created another widget called invite_accept that displays on the url that is sent to the user's e-mail. Once the user clicks on the link & is taken to this page, an edit form will display (32) that will allow the user accepting the invite to change the username & password fields for the user who has the supplied invite_key attached to the end of the url.

I've been able to successfully change my contact's usernames & passwords using this method. The biggest issue, currently, is that I'm unable to log in with specified users after updating their information (it gives me a 'wrong username or password' error). I've confirmed that the fields are being updated in the db, so this error shouldn't be happening. The only thing that I think could be causing this error is that the user permissions for contacts is set to '5' & their is no permission group with that level, so it might be conflicting there.