WordPress MU plugin: Secure invites

Wed Jan 14

I’ve just released a new project – in fact my very first public WordPress MU plugin. As I’ve been working with WordPress MU for a number of years it’s about time I gave something back.

Anyway, the plugin does what it says on the tin. It restricts signups only to people who have been invited. There are a few configuration options, and a page showing some invitation statistics. See more details on the secure invites plugin here.

You can download the plugin from wpmudev.org. As it’s a beta version I expect there to be bugs, so please enter any problems, questions or suggestions you may have below. Thanks.

Comments for ' Wordpress MU plugin: Secure invites'

100 Responses to “WordPress MU plugin: Secure invites”

  1. John Says:

    Hey Chris,

    Great idea about the WPMU plugin. Surprised it didn’t come standard with it. That said, I uploaded the php file to my /mu-plugins subfolder and even though I am seeing the Invite plugin stuff on my admin backend, I don’t seem to see a place to actually initiate any invites!

    Is there a missing step? Or did I miss something?

    Thanks,
    John

  2. chris Says:

    Hi John. The invitation form is located on the main submenu, next to “Dashboard”. There’s a screenshot here: http://wibsite.com/help/inviting-friends/

    Let me know if you have any more questions.

  3. John Says:

    Thanks, Chris. I figured out the problem.

    It is with the invite settings – the amount of days you must be a member in order to be allowed to invite others. The default is 100; I set it at 500.

    The reason why is that I am a teacher and I don’t want my students to invite others, but I guess I could just disable new enrollment in order to do that.

    Great addition though to MU. Thanks for your help!
    John

  4. John Says:

    Ahh…another bug – at least for me.

    I went to send an invite, and it came back a 404 error. It says that the page “/wp-admin/index.php” is not found on the server. When I checked, the file is there.

    Any ideas?

    Thanks in advance,
    John

  5. chris Says:

    That’s really strange John. Can you put a screenshot of the error (the whole window – including address bar) somewhere for me to see. Email me if you don’t want to put the address here: chris (at) this domain.

  6. Marcelo Says:

    Hi, sorry for my english.

    This plugin is great! But it can do more… If the plugin limit the number of invitations per member.

    Can you do this work on this plugin?
    Thanks!

  7. chris Says:

    Hi Marcelo. That’s a good idea, but I’m not sure when I’ll have chance to work on it. I’ll certainly think about adding this functionality when I can.

  8. Marcelo Says:

    Hi Chris!

    Can you give me a little help?

    I want to enable the invites for subscribers too. My WPMU is closed to people create your own blogs, only to register at subscriber. I want use this plugin with the BuddyPress plugin.

    I know a little of PHP, can you give me the line where i need to change?

    Thanks

    Sorry for my bad english.

  9. sink Says:

    Hi Chris!

    I installed in WPMU 2.7 not work

    “Your invitation could not be sent to xxx@gmail.com. Please try again. If it fails more than twice please contact the site administrator.”

    Thanks!

  10. chris Says:

    Hi Sink. I presume that the email address entered was a valid one (I guess so if it’s at gmail.com). I’ll give it another try myself and see if there’s a bug somewhere.

    By the way, have you tried it with any other email addresses?

  11. chris Says:

    Hi Sink. I’ve tried this on a MU 2.7 install and it worked fine for me. Can you provide me with any more details? Thanks.

  12. sink Says:

    Hi Chirs

    The install I used is subdirectory way(domian.com/blog1, domian.com/blog2)
    When I send invitation from subblog, it comes back to Dashboard automatically. Only main blog show fail sending.

    ‘action’ seems wrong execution
    action=”/wp-admin/index.php?page=secure_invite”
    What’s more, enter wp-signup.php from website sub catalog… the register page will still show on it. e.g. domain.com/category/uncategorized/wp-signup.php

    Some blog you can see invite memu but some can’t, it’s weired could you check?

    My hosting is bluehost

    Thanks for your help.

  13. bogdan Says:

    I have the same problem as sink…the invitation returns the following error “Your invitation could not be sent to abc@mail.com. Please try again. If it fails more than twice please contact the site administrator.”

    do you have any ideas? any help is more than welcome as the website is almost ready but this little glitch…

    thanks a lot…

    cheers…

  14. Jake Says:

    Love the plugin but I’m having some trouble getting it to work properly with a BuddyPress install. In short I can’t seem to prevent people from signing up, invitation or not.

  15. chris Says:

    Thanks for reporting these errors. I’ve taken a look at the plugin and made the following changes:

    - Made the wp-signup.php page more secure, fixing sink’s error for a path like ‘domain.com/category/uncategorized/wp-signup.php’. I think this is a bug with WordPress, but the plugin should now handle that OK.

    - Fixed the form “action” attribute on the invitation form so hopefully it will work with subdirectory installs of MU.

    - When an invitation fails with the ‘Your invitation could not be sent to [email]. Please try again. If it fails more than twice please contact the site administrator.’ error it’s because of a SQL failure. When this happens the site administrator will get emailed with details of the SQL error which occurred. It should be obvious from that what the problem is, but if you have any questions please let me know here.

    - I’ve changed the script to use the wp_mail() function rather than the standard PHP mail() function. I’m not sure this will have any effect, but it doesn’t hurt to do things the WordPress way.

    Please download the latest version of the plugin from WPMUDEV: http://wpmudev.org/project/secure-invitations

  16. Matew Says:

    Hi Chris,
    I’ve found your plugin really nice. I’ve one suggestion:
    I would be great to have possibility to turn of “Inviting lockdown (days)”, now if I write 0, the invitation form row disappears. I need this to quickly create core community members , now they must wait one day to invite others.
    Also I’ve problems with plugins table creation. It doesn’t create it for me automatically. Could you explain how can I do this manually?, I don’t have much experience with PhpMyAdmin.
    Thanks for your help.

  17. Matew Says:

    I found the way to create using your code from plugin:
    I went to database, clicked SQL tab and there inserted second code:
    create table wp_invitations (
    id int NOT NULL AUTO_INCREMENT,
    user_id int,
    invited_email varchar(255),
    datestamp datetime,
    PRIMARY KEY id (id),
    KEY user (user_id),
    KEY email (invited_email),
    KEY dtstamp (datestamp)
    ) DEFAULT CHARACTER SET utf8;
    *Note that “wp_” is your database prefix.

    Everything works fine, but there is a problem with subdirectory:
    I’m now testing my project in subdirectory, and the plugin sends invitation link with http://domain.com/wp-signup.php?email@xxxxx.com, although it should be http://domain.com/subdir1/subdir2/wp-signup.php?email@xxxxx.com. I’m not sure yet is that problem in my wpmu installation or in plugin.
    I’ve one more suggestion for development – it would be awesome if email in invitation link was encrypted.
    Thank You once more.

  18. chris Says:

    Hi Matew,

    I would be great to have possibility to turn of “Inviting lockdown (days)”, now if I write 0, the invitation form row disappears. I need this to quickly create core community members , now they must wait one day to invite others.

    I’m not sure what you mean by this. Can you give me some more details, please?

    I’m now testing my project in subdirectory, and the plugin sends invitation link with http://domain.com/wp-signup.php?email@xxxxx.com, although it should be http://domain.com/subdir1/subdir2/wp-signup.php?email@xxxxx.com. I’m not sure yet is that problem in my wpmu installation or in plugin.

    I think that’s a problem in the plugin. I’ll try to fix that soon.

    I’ve one more suggestion for development – it would be awesome if email in invitation link was encrypted.

    Yes, this is something I’ve thought about before. I’ll try to add that feature in.

  19. buzz lightyear Says:

    hi Chris,
    thanx for this interesting plugin.
    Would there be please a way, to have an option in dashboard, where i could enable either:
    invitations only
    OR
    invitations AND normal signups?

    thanx

  20. Matew Says:

    “I would be great to have possibility to TURN OFF “Inviting lockdown (days)”, now if I write 0, the invitation form row disappears. I need this to quickly create core community members , now they must wait one day to invite others.”
    I mean that in fresh WPMU installation I can not invite other people, because there is no invitation form. I and my NEW USERS must wait at least one day to use it (I solved it by changing my ADMIN registration date in database). Also one day is the minimum period of time which new users must wait for making invites(if I write 0 in Invite Settings/Inviting lockdown (days), the invitation form row disappears). My suggestion is to have possibility to TURN OFF “Inviting lockdown (days)” option

    “I’m now testing my project in subdirectory, and the plugin sends invitation link with http://domain.com/wp-signup.php?email@xxxxx.com, although it should be http://domain.com/subdir1/subdir2/wp-signup.php?email@xxxxx.com. I’m not sure yet is that problem in my wpmu installation or in plugin.”
    I solved this problem by changing Invite settings/Wp-signup.php Page adress to: /subdir1/subdir2/wp-signup.php
    Sorry for my english

  21. chris Says:

    Hi buzz lightyear

    Would there be please a way, to have an option in dashboard, where i could enable either:
    invitations only
    OR
    invitations AND normal signups?

    Yes, this has been done. Please download the latest version from http://wpmudev.org/project/secure-invitations

    Matew:

    I mean that in fresh WPMU installation I can not invite other people, because there is no invitation form. I and my NEW USERS must wait at least one day to use it (I solved it by changing my ADMIN registration date in database). Also one day is the minimum period of time which new users must wait for making invites(if I write 0 in Invite Settings/Inviting lockdown (days), the invitation form row disappears). My suggestion is to have possibility to TURN OFF “Inviting lockdown (days)” option

    That’s very strange, as in my testing setting the “Inviting lockdown” field to “0″ works as expected. Can you check in your database what the “secure_invite_days_after_joining” row in “wp_sitemeta” is set to AFTER you save the settings with “0″ in the “Inviting lockdown” field. Thanks.

  22. Matew Says:

    Everything fine there, it was changed to 0. But again Invite option disappears on my local and server installations. I have even disabled all my other plugins, but it still happen.
    Thank You for helping me, Chris.

  23. Cameron Says:

    Is there a way to enable users below the admin level to send invitations? My users are all set as authors and the ‘send invitations’ link under the Dashboard doesn’t show up for them. I want all users, no matter what their role is, to be able to invite others. Is there a setting somewhere or something in the code I need to change? Thanks!

  24. Cameron Says:

    I just looked into it a bit more and realized it’s only showing up for my main blog (none of my member’s blogs). Is there some way to change this or to create an external form outside the dashboard to allow invitations to be sent? I’m integrating this with Buddy Press, btw. Thanks!

  25. Cameron Says:

    Never mind, please disregard my previous comments. I figured it out (feel free to delete them without posting).

  26. chris Says:

    Glad you got it sorted, Cameron. Would you mind posting here with your solution?

    I’m planning on adding a few more options to this plugin, including one that should sort this, but in the meantime some people may find your information useful.

  27. Cameron Says:

    It was just a stupid mistake on my part. I’d put the plugin in the “plugins” folder instead of the “mu-plugins” folder…Once I made the switch it started working perfectly.

  28. Jake Says:

    Still having a problem getting the plugin to work with BuddyPress nicely. Basically I can’t get it to prevent people from accessing the register page within Buddypress.

  29. chris Says:

    Jake, thanks for reporting that. I intend to make some time to work on the plugin this week, I’ll make sure integration with BuddyPress is top of my list.

  30. Takuya Says:

    Aside from buddypress compatibility problem, which you are working on. I also have the “Your invitation could not be sent to abc@mail.com. Please try again. If it fails more than twice please contact the site administrator.”errors.

    I’m using the lastest version available from WPMUDEV. I’ve checked and there’s database available. But there’s one thing that I, as site admin don’t receive any SQL error messages by mail.

  31. Takuya Says:

    Please discard the previous comment. I had another similar name tabled wp_invites, which I mistaken with wp_invitations. btw, the plugin download page should include SQL code in order to create wp_invitations for reference. I could never done this without another comment here.

  32. Bill Says:

    I’m unable to get the invite choice to show up in any member blog, well if I’m using IE 8 both the Invites/Invite settings show up, but it I go to Compatibility mode they both go away. Also no where is the invite form showing up all I get is Invitations per month/ Best inviters/ Invitation list. I have no idea what I’m doing wrong, doing a upgrade from 2.6 to 2.7 and this is one of the features I really want to add in while doing the 2.7 upgrade. Any ideas are welcome ;-) thanks.

  33. Bill Says:

    Opps forgot the say both the Invites/Invite settings show up in members blogs too in IE8 and FF but still missing the form to actually do an invite.

  34. chris Says:

    Takuya, good idea. The code you need to create the table if it doesn’t happen automatically is:

    create table wp_invitations (
    id int NOT NULL AUTO_INCREMENT,
    user_id int,
    invited_email varchar(255),
    datestamp datetime,
    PRIMARY KEY id (id),
    KEY user (user_id),
    KEY email (invited_email),
    KEY dtstamp (datestamp)
    ) DEFAULT CHARACTER SET utf8;

    *Note that “wp_” is your database prefix.

    Bill, have you tried using the latest version of the plugin from http://wpmudev.org/project/secure-invitations? The browser you’re using should make any difference, as there’s nothing in the plugin that should tigger any layout differences between browsers. Please let me know how you get on with the latest version.

  35. Bill Says:

    Yea I was using the newest version, I’m going through the code too see what I’m doing wrong. But the blog is currently a default install using directories not subdomains.

  36. Matew Says:

    Hi, Chris
    “Inviting lockdown (days)”, what you think about one more option with lockdown by hours? It could be specific security for mass blog creation with opened signup.
    I still have problem with 0 days. The minimal value is 1 :(

  37. Bill Says:

    Thanks for the great plugin, figured it all out for some reason it wasn’t reading the default lockdown days so it was defaulting to 30. Adjusted the menus to how I need them and everything else is working great. I was looking for one feature, automatically adding the invited user to the correct blog. Can’t seem to figure out a way to do this, can’t even figure out where wpmu is setting the default blog meta value during the sign up process. Already added the blog ID to your table, adjust need to add to the plugin to add it in after the user creation process.

  38. Matew Says:

    For those who has problem with Buddpress Signup page blocking (register page).
    Change “Signup page” field value in Site Admin/Invite settings from “wp-signup.php” to “register” or whatever slug, your theme uses for member signup.
    For me it works fine.
    Matew

  39. KJ Says:

    Hi there. I’ve installed this into 2.7.1 of WordPress MU but the option to send invites isn’t showing for me at all. It seems to have installed properly but there’s no option to actually send any invites :(

    I’ve set the time limit for being able to send invites to 1 day and still nothing is showing to send out an invite.

    Hope you can help.

  40. Jack Says:

    Installed the latest version into the correct folder, the 2 options show up the column, however, I’m not able to: (1) figure out how to invite users, and (2) the Buddypress part of my site becomes unavailable for some reason. I set the amount of days to 1 too.

    I see the invite page…
    http://i39.tinypic.com/mbhe6d.png
    But there’s no method of inviting people!

    The second plugin page has the settings for days and email to people… that’s great, but I don’t know how to send it out to people.
    Is this vaporware or is there a way to see the option to invite people? If so, I’m really excited to use this. Any help?

    Also, any ideas why this plugin makes my buddpress site unusable?

    Please let me know. Thanks.

  41. chris Says:

    @KJ and @Jack: The menu option to send invites should be in the “Dashboard” section of the admin menu. Can you send a screenshot of that menu section or otherwise confirm that the menu item definitely isn’t there.

    I’ve used this plugin in several different installations of WPMU and many other people have used it and I’m not aware of a bug regarding the menu option. In fact if the menu part pf the plugin wasn’t working then the site admin menu items wouldn’t appear either.

    @Jack: I’m not aware of any reason this plugin would stop your BP installation working. I’ll try it in one of my BP sites to see if there’s a problem.

  42. Jack Says:

    Oh, it’s the new version of Buddypress. Awful. It doesn’t work for some reason so I had to go back to the original version.

    I found the link in the Dashboard. Thank you!

  43. klaus Says:

    Hi Chris,

    Let me start by first telling you that this is a great plugin, it works for me as advertised.

    However, since my BuddyPress site shields members totally from the WP Dashboard (to keep things simple) I wonder if you ever thought of offering a true BP version which would be integrated with the bphome theme? In other words, the member function (invite friends) would not be part of the WP Dashboard but instead accessible via the ME page under the sub column MY FRIENDS . The site admin functions (Invites and Invite settings) can stay where they are.

  44. mt Says:

    @klaus: I’m working on Integration in Buddypress. I hope I’ll finish it over the next days. I’ll post the code here.

  45. Tore Says:

    This plug-in has sent me into a storm of thought. I’ve been walking down the road of using DNN and ActiveSocial for my new page. But this plug-in is what’s vying me away from that solution. I hope that Buddypress compatability will come.

    Thanks!

  46. Tore Says:

    Hello again! I’m most impressed with the functionality of this plugin. It really helps me with only registering people that people I trust will invite… Right now the website is live and it works fine except that the statistics don’t show. Any clue to what’s wrong?

  47. chris Says:

    Hi Tore. I’m not sure what’s wrong, to be honest. Can you email me a screenshot of what the stats look like, please?

  48. Reid Walley Says:

    Hi Chris,

    Cool plugin. I noticed there are two different versions of Secure Invites available online. Which one is the best for WPMU and BuddyPress? v0.6 at http://wordpress.org/extend/plugins/wordpress-mu-secure-invites/ –OR– v1.0 at http://wpmudev.org/project/secure-invitations

  49. Reid Walley Says:

    Hi Chris,

    The Invite Friends link doesn’t exist in the Admin > Dashboard panel. Please see screen shot: http://www.flickr.com/photos/reidwalley/3920334319/

    I installed both v0.6 (WordPress.org repo) and v1.0 (WPMUDev.org repo) versions but neither has the Invite Friends link available in the Dashboard panel.

    I’m running WPMU v2.8.4 and BuddyPress v1.0.3

    Hope this helps.

  50. chris Says:

    Hi Reid. You should always download the latest version from the WordPress site (http://wordpress.org/extend/plugins/wordpress-mu-secure-invites/). I’ll remove the WPMUDev plugins as soon as I can as they are out of date.

    I’ll email you about the other problem.

  51. Tuomas Says:

    Great! You just solved quite a few of my problems :) May I ask some more? I have a feature request… this may be a bit complex, but I really could use it, and I believe some others could as well:

    1) Create a capability to invite (make invitations).
    2) Make tools to assign (revoke) this capability to certain, handpicked, users.
    3) Restrict the ability to invite people to users with this capability.

    Need to keep it BP 1.1 compatible.

    Thanks :)

  52. chris Says:

    @Tuomas

    > 1) Create a capability to invite (make invitations).
    > 2) Make tools to assign (revoke) this capability to certain, handpicked, users.
    > 3) Restrict the ability to invite people to users with this capability.

    So you’d like the ability to restrict the ability to invite to only a selected group of users. Yes, that’s certainly possible. I’ll add it to the to-do list.

  53. Tuomas Says:

    Cool :-)

    How about, if the newly invited people could be categorized as newbies, until manually upgraded/certain period of time?

  54. chris Says:

    Hi Tuomas,

    > How about, if the newly invited people could be categorized as newbies, until manually upgraded/certain period of time?

    There is already the ability to restrict new users from inviting people until a certain number of days after they registered. Is that what you mean?

  55. hcl Says:

    Hi, are you familiar with the functionality of the following plugin?

    http://wordpress.org/extend/plugins/invitefriends-plug-in/

    By some guy Caputo. Lacks the tracking features of your plugin, but includes multi-invite form and clever API mass invite.

  56. Mark Says:

    I would not show “Invite Friends” if the registrations are disabled:

    > add to the top of function secure_invite_user_can_invite() :
    > Line ~ 504 in secure_invite.php
    if ( (“all” == get_site_option( ‘registration’ )) ) { // || is_site_admin () || (“user” == get_site_option( ‘registration’ ))
    // proceed further
    } else {
    return false;
    }

  57. chris Says:

    Thanks for the suggestion Mark, I’ve added that to the plugin and committed it, so you should soon be able to download version 0.7 from here: http://wordpress.org/extend/plugins/wordpress-mu-secure-invites/

  58. Jesse Says:

    I am having trouble locating the invite form. I have located the Invite settings and the Invite statistics pages, but I can not locate the Page to actually invite a new member to my site. Can you tell me where this should be located? Im using WPMU 2.8.6 and Plugin version 1.0. I have looked in both the admin backend and a user backend for the invite form and can not locate it.

  59. Jesse Says:

    I figured it out. My new registered user hadn’t been registered long enough. I ended up not needing this feature of your plugin. So I just removed it and all is good. I did try putting a zero a the amount of days to be registered before use, thinking this would allow a new user to immediately invite new user but that didn’t work.

    I think placing a zero in the number of days before new users can invite making the Invite Friends menu immediately available would be a good feature to add.

  60. Mark Says:

    Hello Chris,

    Thank you for incorporating the suggested fixes into version 0.7.

    Please find below two more issues fixed.

    1. Old (not invited users) were not able to create extra blogs.
    2. Invitation can be easily reused (a small patch makes it more difficult).

    You only need to add/alter few lines at the top of your code:

    add_action( ‘wp_head’, ‘secure_invites_wp_head’ );

    // this function requires function is_user_logged_in
    // the issue is that mu-plugins are loaded prior to pluggable.php in /wp-settings.php
    // so we need to do this check with wp_head hook

    function secure_invites_wp_head () {
    global $wpdb;

    // when the wp-signup.php page is requested
    $secure_invite_signup_page = get_site_option(“secure_invite_signup_page”);
    if ( ( strpos ( $_SERVER["REQUEST_URI"], “wp-signup.php” ) !== false || strpos ( $_SERVER["REQUEST_URI"], $secure_invite_signup_page ) ) && ( get_site_option ( “secure_invite_open_signup” ) != “1″ ) && ( ! is_user_logged_in () ) ) // ADDED ! is_user_logged_in () – that the existing users can create new blogs
    {
    // set the signup request as not valid
    $valid = false;

    // check the email address is a valid invitation
    if ( isset ( $_SERVER["QUERY_STRING"] ) && ( secure_invites_is_valid_email ( $_SERVER["QUERY_STRING"] ) || secure_invites_is_valid_email ( trim ( @$_POST["user_email"] ) ) ) )
    {
    $valid = true;
    if ($_SERVER["QUERY_STRING"] != “”)
    {
    $_POST['user_email'] = $_SERVER["QUERY_STRING"];
    }
    }

    // if the signup request is not valid
    if (!$valid)
    {
    // show the message
    $secure_invite_no_invite_message = get_site_option(“secure_invite_no_invite_message”);
    if ($secure_invite_no_invite_message == “”) { $secure_invite_no_invite_message = “Sorry, you must be invited to join this community.”; }
    // stop processing
    wp_die ($secure_invite_no_invite_message);
    exit ();
    }

    // check if the invitation was used
    // at the moment, we can only check if the e-mail (user) is registered and derive that the invite was used
    // still, some users may change their e-mails and this way achieve miltiple signups
    // for better invite accounting one needs to tag used invitations in “invitations” table
    if ( is_email ( $_SERVER["QUERY_STRING"] ) ) {
    $found = $wpdb->get_var ( $wpdb->prepare ( “SELECT user_login FROM $wpdb->users WHERE user_email = ‘%s’”, $_SERVER["QUERY_STRING"] ) );

    if ($found) {
    // stop processing
    wp_die ( ‘E-mail ‘ . $_SERVER["QUERY_STRING"] . ‘ was already registered. If you are the registrant, please sign in.’); // ?user_login=’ . $_SERVER["QUERY_STRING"] . ‘
    exit ();
    }

    }

    }

    }

    add_filter (‘signup_user_init’, ‘secure_invites_signup_user_init_filter’);

    // assign default e-mail
    function secure_invites_signup_user_init_filter ($result) {

    if ( “” == $result['user_email'] ) {
    if ( is_email ( $_SERVER["QUERY_STRING"] ) ) {
    $result['user_email'] = $_SERVER["QUERY_STRING"];
    }
    }

    return $result;

    }

  61. Mark Says:

    Oh, one more feature was added:

    3. Assign default e-mail so that the user does not need to retype it.

    [see the code above]

  62. Mark Says:

    When trying to use another custom message with html tags and ” quotes, e.g.

    Sorry, you must be invited to join this community.</p><br /><p>If you were invited but changed your e-mail address on the sign up page, please mind that you need to use the exact address which you received in the invitation.<sup>[<a href='/faq/sign-up/#personal-invitation' target='_blank'>Why?</a>]</sup><br />It will be possible to change your address later.<br />Please go back to the <a href=’javascript:history.back(1);’ onclick=’javascript:history.back(1);’>previous page</a>.</p><br /><p>If you did not receive an invitation from your friends yet, you may consider applying for one on the <a href=’/invite-me/’>open basis</a>.

    I had to use http://php.net/stripslashes

    > N.B.
    > Secure Invite will add as prefix and suffix
    > “” will not work, you will need to use ” quotes

    > Actual FIX:
    > add stripslashes in function secure_invites_wp_head () {
    $secure_invite_no_invite_message = stripslashes ( get_site_option ( “secure_invite_no_invite_message” ) ); // FIXED !!!!!!
    > add stripslashes in function secure_invite_settings()
    $secure_invite_no_invite_message = stripslashes ( get_site_option ( “secure_invite_no_invite_message” ) ); // FIXED !!!!!!

  63. Mark Says:

    > Secure Invite will add <p> </p> as prefix and suffix

    This will work on ” but not on “” quotes

  64. chris Says:

    Thanks Mark, I’ll look at getting these into the code as soon as I can.

  65. Paul Hastings Says:

    Great plugin! I’ve been using it on my site and love it. You’ve done a great job and I’m grateful for that.

    Like Klaus mentioned back in June, it would be awesome if users had a way to handle the entire invitation process from the Buddypress Bar or the Buddypress Profile instead of having to use the WordPress Dashboard.

    Is there a simple plugin hack to do that?

    Thanks,
    Paul

    :)

  66. chris Says:

    Sorry Paul, there isn’t a simple hack to do that. There are lots of things I’d like to do with this plugin, but I just don’t have very much time at the moment.

    I’ve just updated the plugin thanls to the suggestions from Mark at http://of-cour.se/ to fix slashes problems and allow logged-in users to create further blogs.

  67. AlexSan Says:

    Dear Cris,

    I installed this plugin (under instruction), waited a few days, but I do not see a link to an invitation to the console. Other users also do not see myself in this link. The latest version of MU and BP. How to organize the work of this plugin? Thank you for your reply.

    It screens the admin and user:
    http://watch-hub.ru/admin.jpg
    http://watch-hub.ru/user.jpg

  68. AlexSan Says:

    no spam!

    Dear Chris,

    I installed this plugin (under instruction), waited a few days, but I do not see a link to an invitation to the console. Other users also do not see myself in this link. The latest version of MU and BP. How to organize the work of this plugin? Thank you for your reply.

    It screens the admin
    http://watch-hub.ru/admin.jpg

  69. Paul Hastings Says:

    Hi Chris,

    Sorry to bother you again, but I’m having issues with version 0.8

    Whenever I uncheck the “Open signup” option in version 0.8 users can’t create new accounts. When they click the link in their email it takes them to a page that’s completely blank (e.g. http://jibenow.com/register?napauleon16@yahoo.com).

    For right now I’ve had to enable an open sign-up on my site. Do you have any idea what’s wrong?

    Thanks,
    Paul

  70. chris Says:

    AlexSan: “I installed this plugin (under instruction), waited a few days, but I do not see a link to an invitation to the console.”

    Sorry about this, I’m not sure why it’s not giving you the link. I’ve updated the plugin so it gives HTML comments to explain why a particular user can’t view the invite form. Please look for “

    Paul: “Whenever I uncheck the “Open signup” option in version 0.8 users can’t create new accounts”

    I’m sorry, I know there are some strange things that can happen in BuddyPress. Please check your settings, making sure that the “Signup page” address is correct – it should be “register” I think for BP. Please let me know what happens.

  71. Paul Hastings Says:

    Yes, the actual sign up page on the site is: http://jibenow.com/register

    The “Signup page” field is set to “register”.

    That’s what my settings were in version 0.7 and as far as I know everything worked correctly then. I would revert back to 0.7 if I could but the WordPress plugin repository only shows version 0.5 and 0.8.

    Perhaps there was a minuscule change in version 0.8 that’s causing the error? I’m running WP MU 2.8.6 and BP 1.1.3

    Any thoughts?
    -Paul

  72. Paul Hastings Says:

    I tried updating to 0.8.1 but again no luck. Also, when I was logged out and clicked the “register” button ordinarily the register page would say “Sorry, you must be invited to join this community” but nothing shows at all. Just a blank screen.

    I see that you’ve added 0.7 back in the repository so I’ve reverted back to that. Everything appears to be fine again now that I’m using 0.7 . If you’re logged out and click the register button you’ll see the “Sorry, you must be invited to join this community” message. Also, when invitees click the links in their emails the register page displays correctly (instead of being blank).

    Is it possible that 0.8 (and 0.8.1) is neglecting to call a certain file that 0.7 does? Like maybe wp_footer.php or something?

  73. chris Says:

    Great, glad you got it working again. 0.8 was (to my shame) a rushed release. I’ll try to make some time to fix it properly.

  74. chris Says:

    Paul, I’ve released 0.8.2 which should fix all the bugs. Please download it from the WP repository: http://wordpress.org/extend/plugins/wordpress-mu-secure-invites/

  75. Erick Says:

    Chris,

    I’m having similar problems with 0.8.1 to those described by other users. I just checked the repository, and 0.8.2 is not available there. I checked the plugin SVN and don’t see the newest version there either. Any ideas where I can get version 0.8.2?

    Thanks,
    Erick

  76. Tore Says:

    Hi Chris and everyone! Just want to let you know that this plugin doesn’t work with BP 1.2. Users can easily circumvent this plugin. I’ve emailed about the specifics.

    Thanks!

  77. Tore Says:

    Oh, perhaps I was to quick. You can set this in the admin panel. Still it seems that it’s not working as before. I’ll have to try it a little more.

  78. Paul Hastings Says:

    Hi Chris,

    I’ve updated to version 0.8.3 (I’m still using BP 1.1.3) and everything’s working like a charm. The only thing I’m still bothered by is that whenever a member invites a friend the “From” field is always “noreply@jibenow.com” (which looks kind of spammy).

    I looked around at the source code and saw that the plugin is supposed to be using the email address of the invitation sender. Do you have any idea why this isn’t the case?

    Thanks,
    Paul

    :)

  79. Paul Hastings Says:

    I’m now using BP 1.2 and WPMU 2.9.1 with the WP From Email plugin and everthing’s working fine. So if I could make feature requests for 0.8.6 then here’s a few.

    Currently I have to manually delete each invite and then let the page reload 1 by 1. This can get to be a big hassle as a site grows. With hundreds of expired invites to wade through every day this could be really time consuming.

    Automatic deletion of expired invites
    Mass deletion of invites
    Ability to automatically increase the number of invites for certain users based upon their tenure on the site
    Ability to arbitrarily increase the invites for certain users (perhaps you’ve appointed them in charge of a recruitment drive)

    Those are my thoughts for now.

    Thanks again for the plugin,
    - Paul

  80. calvin Says:

    I’m using bp 1.2.2.1 with wpmu 2.9.2. I installed this plugin and it can be configured through the control panel. However, I cannot find the “invite friends” button in the dashboard section or anywhere else.

  81. Paul Hastings Says:

    Oh, another request would be Buddypress integration for users. That way users could invite friends right from main Buddypress site instead of having to go into their blog dashboards.

  82. Elizabeth Edwards Says:

    I had this working before upgrades of both wpmu and this plugin, now I uploaded it to mu-plugins and nothing shows up in admin at all.

    and if I try and put in plain plugins I get

    Parse error: syntax error, unexpected T_DNUMBER, expecting ‘,’ or ‘;’ in /home/*****/public_html/aaw/wp-content/plugins/wordpress-mu-secure-invites/secure_invite.php on line 689

    Please help

  83. Paul Hastings Says:

    I just saw the updated version in the Plugin Repository: http://wordpress.org/extend/plugins/wordpress-mu-secure-invites/

    Awesome changes! I plan to upgrade to the latest version as soon as I get the chance.

    -Paul

  84. Rune Says:

    Hi Chris,

    First of all; Thanks for creating such an awesome plug-in, especially with the new rating system in the 0.9 version. It works like a charm from the WordPress back-end. However, when I use the in a specific post (pulled from an if-statement in the template) the form just returns my 404-page when trying to send invites (the address bar returns http://myaddress.com/?send=invites).

    I’m running WPMU 2.9.2 with version 0.9 of the plug-in.

    I’ve been trying to fiddle around with the plug-in code, but no success so far. Any ideas?

    Thanks,
    Rune

  85. chris Says:

    Elizabeth: please upgrade to the latest version and ensure it is installed properly. Then let me know if you still have the same problem.

  86. chris Says:

    Rune: if you can put a link to your site here I’ll take a look. Otherwise please email me at gmail.com, name “mrwiblog”.

  87. Reza Says:

    this plugins dos not work for WPMU and BUDDYPRESS for us .

    if you sure , plugin is active with :
    Signup is just for invited people, and all users can invite as many people as they like

    please , check your address with :

    http://yourdoamin.com/register
    http://yourdomain.com/members

    and other directory is open

    so , So everyone can see your site and be a member !!!!!!!!!!!!

    How is problem solving?

    help me
    tanks
    name_arts@yahoo.com

  88. Reza Says:

    i’m sorry please ,ignore my reply !!!
    My problem is with login redirection like as

    Force User Login
    Registered Users Only 2
    Registered Users Only

    how can i set one of These plugins with Secure invitation plugin ?
    sorry for my bad english

  89. Ojo Flaquis Says:

    Hey

    Thanks for the plugin.

    I’m using the latest versions of WPMU, buddypress and your plugin (and the default buddypress theme)

    I found a couple of things…

    1) The “invite” feature doesn’t show in Google Chrome (it does in firefox).

    2) The registration link does not work in the email – when I click the link I get “Sorry, you must be invited to join this community.” – which kinda defeats the purpose. :)

    Are these bugs (the chrome things looks to be) – or just me doing something wrong ?

    Thanks

    Ojo

  90. Ojo Flaquis Says:

    Also…

    it looks as if someone signs up with a different email address than the one in the email – it doesn;t get counted against the invite.

    Ojo

  91. Paul Hastings Says:

    Hi Chris,

    I’ve located a few other bugs with 0.9.2

    1. Checkboxes: If one of the “Buddypress theme settings” checkboxes is checked (in my case “At the top of the default sidebar”) I can’t seem to uncheck it. Whenever I do and then click “Save Settings” the page will refresh and the checkbox is still marked. However if I check one of the other boxes and uncheck the original I can save the settings. But there’s no way for me to uncheck all of them.

    2. Group Invites: Apparently a function is being called incorrectly or something. If one of the members of a group (in this case the “Feedback” group) clicks “Send Invites” to invite other members of the site to join the group he’s presented with the “Invite a Friend” form from the Secure Invites plugin rather than the group invites form from the Buddypress Core.

    So right now members can invite non-members to join the site but can’t invite current members to join their groups. Here are 2 screenshots:

    http://jibenow.com/files/2010/04/WPMU-Secure-Invites-0.9.2-Invite-Friends-to-Groups-01.png

    http://jibenow.com/files/2010/04/WPMU-Secure-Invites-0.9.2-Invite-Friends-to-Groups-02.png

    Thanks,
    Paul

  92. chris Says:

    Ojo:

    > 1) The “invite” feature doesn’t show in Google Chrome (it does in firefox).

    Can you provide a screenshot or a URL where I can see this for myself, please? I find it very strange that it would work in one browser and not in another.

    > 2) The registration link does not work in the email – when I click the link I get “Sorry, you must be invited to join this community.” – which kinda defeats the purpose.

    Did you have any strange characters in your invited email address? Are you sure the link you went to was correct (some email clients can break long links)?

    > it looks as if someone signs up with a different email address than the one in the email – it doesn;t get counted against the invite.

    I’m afraid so. I was aware of that but it wasn’t worth the development time to try to work around it. I think that is actually not a common problem.

    Paul:

    > 1. Checkboxes: If one of the “Buddypress theme settings” checkboxes is checked (in my case “At the top of the default sidebar”) I can’t seem to uncheck it. Whenever I do and then click “Save Settings” the page will refresh and the checkbox is still marked. However if I check one of the other boxes and uncheck the original I can save the settings. But there’s no way for me to uncheck all of them.

    I’ve just submitted a new version which fixes this (you need to check the new “Don’t use automatic BuddyPress integration” checkbox). The new version will be available in a few hours when it has been checked by the WordPress guys.

    > 2. Group Invites: Apparently a function is being called incorrectly or something. If one of the members of a group (in this case the “Feedback” group) clicks “Send Invites” to invite other members of the site to join the group he’s presented with the “Invite a Friend” form from the Secure Invites plugin rather than the group invites form from the Buddypress Core.

    Ah, good catch. I’ve just submitted another new version with a fix for this which I’ve tested on my local BuddyPress install. Hopefully it will work OK for you now.

    I’m not sure why the plugin would mess up your custom header, but hopefully the fix I just released will stop that bug happening.

  93. Paul Hastings Says:

    Thanks Chris.

    Ojo, I had the same problem until I realized that I needed to change the “Sign up” field in the “Signup” section. The default is “example.com/wp-signup.php” which should actually read “example.com/register”. Just replace “register” with the name of your signup page.

  94. Paul Hastings Says:

    Hi Chris,

    I have an additional feature request which I hope isn’t beyond the scope of the plugin. Sometimes it becomes necessary to open up site registration for a group of people that I don’t know personally and that are far too large for me to invite individually. However, I don’t want to open up site registration completely for the public at large.

    An example would be if my community is for school teachers. Normally the members on the site (i.e. teachers) would invite their other teacher friends. But then let’s say that my site is a vendor at a teacher convention and we would like to open up registration to all attendees to the conference… but not for anyone else (unless they’re invited the regular way by existing members).

    Could we integrate a “Multiple Invitation Codes” feature? Here’s a similar plugin (it only features an invitation code though, not member invites).

    Basically, I could include one code (e.g. “TEACONF”) in the brochures that my booth has at the teacher’s conference, and then I could print another code (e.g. “MAGPROMO”) in an advertisement in a teacher’s magazine.

    Thanks,
    Paul

  95. Paul Hastings Says:

    Oh, and one way that this could work is when a visitor to the site clicks on the register button they’re redirected to the normal “You must be invited to join this community page”. Then one paragraph below would be a text field saying “If you have an invitation code please enter it now”.

  96. james Says:

    Is there an easy way to have a “request invite” form? Perhaps so you can collect interested users while your site is in testing or something? Bulk invites, like the invite en masse plugin, would then be very handy. Thanks for all your work. Cheers!

  97. Martin Says:

    Hi!

    I am running a website which is open for registered users only (BP 1.1.3, WPMU 2.9.1.1, Secure Invite 0.9.6). I have installed the SI plugin as desired. The invite form works and I have tested the functionality on some test users. Emails are sent OK, new invites were saved in the database like this:
    “1″;”2″;”tell@poradci-sobe.cz”;”2010-05-22 23:27:21″
    “2″;”2″;”tell@poradci-sobe.cz”;”2010-05-22 23:38:35″
    “3″;”2″;”martas@poradci-sobe.cz”;”2010-05-23 00:18:45″
    “4″;”2″;”kokotic@poradci-sobe.cz”;”2010-05-23 00:42:03″
    “5″;”2″;”satan@poradci-sobe.cz”;”2010-05-23 01:25:56″

    BUT: when I look at the Secure invite admin page (statistics – pr month, invitation list…) I see “No invitation sent yet”. Which is obviosly not true.

    What is wrong?

    Thanks a lot for helping me out!

    Martin

  98. chris Says:

    Paul:

    “when a visitor to the site clicks on the register button they’re redirected to the normal “You must be invited to join this community page”. Then one paragraph below would be a text field saying “If you have an invitation code please enter it now”.”

    This is a good idea. I’ll bear it in mind for a future version.

    james:

    “Is there an easy way to have a “request invite” form? Perhaps so you can collect interested users while your site is in testing or something? Bulk invites, like the invite en masse plugin, would then be very handy.”

    Both good ideas too. I’ll bear these in mind.

  99. chris Says:

    I’m not sure what the problem is. Can you send me an invitation so I can test it, please?

  100. simon Says:

    I’ve tried just about every configuration with my WPMU buddypress install and can’t get past the “Sorry, you must be invited to join” message after an invited person clicks their invite link.

    my signup page is set to : wp-signup.php,wp-login.php?action=register,/register

    and I’ve tried both wp-signup.php and register.php as my email link but get the same results.

    The site registration is set to “Both sites and user accounts can be registered.”

    Are there any other things that i should check? Thanks

Leave a Reply