Hello, I tried your code with adding it in functions.php of the theme and replacing in add_role ‘invited_members’ by the name of my custom role. But it doens’t work, the new invited stays subscriber.
Is it because is not an invite sent to a group but by mail ?
What is the variable $inviter ? the member wich send the invite or this one wich receive the invitation by mail ?
I don’t find the variable $invited_users in by-mail.php nor in your functions.php. Is it a Buddypress variable ?
I see in the file functions.php of your module in the $defaults_array : ‘minimum_role’ => ‘subscriber’.
What is it ? Is it the minimum role of member to be able to send an invitation ?
And an other question : when the new user has followed all the steps and go to the profile of wich had invited him, he cannot write on his wall or add medias, just read. Is it normal ?
Thanks a lot for your help !
Otherwhise, your plugin works fine !
Thank you very much for your reply. The plugin allows members to invite by email friends wich are not yet subscriber (friends in the real life not BP friends). So, I need to associated a custom user role at these new members for other functionnalities in the website. I’ll try your code.
I have not yet tested the plugin to the end to see if the guest is only associated with the group that invites him or if he then has access to all groups.