Latest News:
Latest Mods: Latest Tutorials:


 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: invitation only problem [For 1.6.1] (not subtracting user sent invitations)
Author Message
b.h.
Proud Paid Member


Posts: 63
Joined: Aug 2009
Reputation: 0
Post: #1
Solved: invitation only problem [For 1.6.1] (not subtracting user sent invitations)
its sending the invitation codes from the User CP but, its not redirecting once sent and its not removing the total number of invitations once I send 1

for example I have 3 invitations, I send 1 from the User CP to an email address. it sends, but doesn't say its sent and still shows I have 3 invitations
(This post was last modified: 03-05-2011, 12:04 AM by b.h.)
03-04-2011, 09:06 AM


Nickman
Manager



Posts: 2,631
Joined: May 2008
Reputation: 61
Post: #2
RE: invitation only problem 1.6.1
Try changing this line in inc/plugins/inviteonly.php

Find
Code:
$getInvite=$db->query("SELECT invite FROM ".TABLE_PREFIX."invitationonly WHERE givento='$uid'");
to
Code:
$getInvite=$db->query("SELECT invite FROM ".TABLE_PREFIX."invitationonly WHERE givento='$uid' LIMIT 1");


DailyMix
03-04-2011, 09:11 AM
b.h.
Proud Paid Member


Posts: 63
Joined: Aug 2009
Reputation: 0
Post: #3
RE: invitation only problem 1.6.1
$getInvite=$db->query("SELECT invite FROM ".TABLE_PREFIX."invitationonly WHERE givento='$uid' LIMIT 1");


nope didn't work, that just generates a new invite number in the ACP. It won't allow me to give invites to a user any more. And Still doesn't record in the USER CP when sent from there
its strange because there are times when the invitations will work, and times they don't, I thought it might be a browser issue. but tried several getting the same results. I have generated more invitations b4 giving them out to members to distribute. Could that be a problem?
Ok, I did this:try it. give yourself 3 invitations. go to the user cp and try sending them. The first records as sent. Then when I send the 2nd one immediately after the first. It doesn't record as sent
(This post was last modified: 03-04-2011, 10:20 AM by b.h.)
03-04-2011, 09:21 AM
Nickman
Manager



Posts: 2,631
Joined: May 2008
Reputation: 61
Post: #4
RE: invitation only problem 1.6.1
Okay, new fix. I believe this should work

open that same file, find
Code:
$getInvite=$db->query("SELECT invite FROM ".TABLE_PREFIX."invitationonly WHERE givento='$uid'");
and change to
Code:
$getInvite=$db->query("SELECT invite FROM ".TABLE_PREFIX."invitationonly WHERE givento='$uid' AND sent != '1'");


DailyMix
03-04-2011, 10:23 AM
b.h.
Proud Paid Member


Posts: 63
Joined: Aug 2009
Reputation: 0
Post: #5
RE: invitation only problem 1.6.1
(03-04-2011 10:23 AM)Nickman Wrote:  Okay, new fix. I believe this should work

open that same file, find
Code:
$getInvite=$db->query("SELECT invite FROM ".TABLE_PREFIX."invitationonly WHERE givento='$uid'");
and change to
Code:
$getInvite=$db->query("SELECT invite FROM ".TABLE_PREFIX."invitationonly WHERE givento='$uid' AND sent != '1'");

This fixed it, Awesome
03-04-2011, 10:33 AM
 




User(s) browsing this thread: 2 Guest(s)