Invitation Key generator: group_id and group_title
Posted: 27 December 2007 07:29 AM   [ Ignore ]
Newbie
Rank
Total Posts:  6
Joined  2005-04-25

I do not understand how to get the group_id and group_title from the Invitation Key generator to:

1. The Invitation Template

OR more importantly,

2. the Register Form

To test this I used the same code as IRA42, and all I get on the Invitation is Group ID = 1 and Group Title = Superadmin, in other words, the selection in the key generator:

<select name="group_id"
 
{member_groups} 
 
<option value="{group_id}">{group_title}</option
 
{/member_groups} 
 
</select>

does not seem to affect anything in the invitation template.

And the documentation does not say clearly how the group_id and group_title is supposed to control the group to which the users is registered when it comes to the actual registration process

Can anyone help please?

Profile
 
 
Posted: 02 May 2008 12:00 PM   [ Ignore ]   [ # 1 ]
Administrator
Rank
Total Posts:  16
Joined  2005-12-12

This is old, but I just came across looking for something else.

I believe that you don’t pass the member group id directly, you just pass the invitation key like this:

<input type="hidden" name="key" value="{key}" />

That said, this isn’t stated clearly in the docs and I’m having trouble getting this to work properly myself.

Profile
 
 
Posted: 02 May 2008 01:02 PM   [ Ignore ]   [ # 2 ]
Administrator
Rank
Total Posts:  16
Joined  2005-12-12

Also, for the record, the url for the registration form needs to have “key” in the segment before the actual key - a bit like the tag module.

Profile
 
 
Posted: 05 May 2008 09:22 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

Christy,

I’ve managed to get this to work. I’ve also looked at your template code and managed to get it to work. I’m not sure if you’ve done anything since this post as to experimenting though LOL

You’re basically correct… what you need is a seperate template set up for Key Registrations. This is the template you would point users to.
An example of what the beginning of a loop for that Register template would look like is:

{exp:user:register form_name="some_name" return="template_group/template" require_key="yes" key_email_match="yes"}

I’ve added:

require_key="yes”
key_email_match="yes”

Within the form template, as you noted, you’ll want to add this to the loop:

<input type="hidden" name="key" value="{key}" />

In your Key Notification template, make sure you link to it like such:

http://www.yoursite.com/user/register_key/key/{key}

OR

{path='user/register_key'}key/{key}

etc

The path of course, can be whatever you wish smile

I’ll clarify the Docs LOL

 Signature 
Profile
 
 
Posted: 05 May 2008 11:17 AM   [ Ignore ]   [ # 4 ]
Administrator
Rank
Total Posts:  16
Joined  2005-12-12

That was simple!  I thought those were optional parameters.  Thanks Kelsey.

-C

Profile
 
 
Posted: 05 May 2008 01:06 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18
ruraldreams - 05 May 2008 11:17 AM

I thought those were optional parameters.

Haha, well, they are actually smile

But I’m assuming that in most cases, if you’re using a Key Invite, you want them to use that key smile

 Signature 
Profile
 
 
Posted: 05 May 2008 01:31 PM   [ Ignore ]   [ # 6 ]
Administrator
Rank
Total Posts:  16
Joined  2005-12-12

An example of why require_key might be optional. 

Say my regular registration form is at site/register, and I want to give a key url of site/register/key/{key}
Regular visitors are in the “members” user group and invited members are in the “special members” user group or the “extra-special members” group. Then one wouldn’t have to have multiple registration forms.

But I’ll take it any way it works smile

Profile
 
 
Posted: 05 May 2008 01:46 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18
ruraldreams - 05 May 2008 01:31 PM

An example of why require_key might be optional. 

Say my regular registration form is at site/register, and I want to give a key url of site/register/key/{key}
Regular visitors are in the “members” user group and invited members are in the “special members” user group or the “extra-special members” group. Then one wouldn’t have to have multiple registration forms.

But I’ll take it any way it works smile

Yep, definately reasons for not wanting it as well smile
Though, your explaination is definately a really good example of a usage for it wink

 Signature 
Profile