Ive got two types of members on my site (group_id 5 or 6) and I need a way to be able to specify one or the other on the registration page. The only way i can think of to do this is to insert a hidden tag:
<input type="hidden" name="group_id" id="group_id" value="5" />and modify the EE member registration module somewhere to allow either 5 or 6 to be specified, otherwise default to 5 for security reasons.
My question is what module file would this be in? I thought it might be in
/public_html/system/expressionengine/modules/member/mod.member_register.php
but my edits there dont seem to work. The registration completes ok and the user shows up under members but only in the default group id which is 5. Registration does not require activation on this site.
Really all i need to know is am i editing the wrong file? My editing is at line 776 where it says
$group_id = $this->EE->config->item('default_member_group');Id post my modified code but since it didnt work i just replaced the file with the origional to undo my changes.
My registration template code is as follows:
<div id="content">
<form id="register_member_form" method="post" action="http://www.url.com/index.php" >
<div class='hiddenFields'>
<input type="hidden" name="XID" value="{XID_HASH}" />
<input type="hidden" name="ACT" value="15" />
<input type="hidden" name="RET" value="http://www.url.com/index.php/index" />
<input type="hidden" name="FROM" value="" />
<input type="hidden" name="site_id" value="1" />
</div>
<table class="tableBorder" border='0' cellspacing='0' cellpadding='0'>
<tr>
<td class='profileHeadingBG' colspan='2'><div class="tableHeading">Member Registration</div></td>
</tr><tr>
<td class='tableCellTwo'>div class='defaultBold'><span class="highlight">*</span> Username</div><div class='itempad'>Usernames must be at least 4 characters long</div></td>
<td class='tableCellOne'>input type="text" name="username" value="" maxlength="50" class="input" size="25" ></td>
</tr><tr>
<td class='tableCellTwo'>div class='defaultBold'><span class="highlight">*</span> Password</div><div class='itempad'>Passwords must be at least 5 characters long</div></td>
<td class='tableCellOne'>input type="password" name="password" value="" maxlength="40" class="input" size="25" ></td>
</tr><tr>
<td class='tableCellTwo'>div class='defaultBold'><span class="highlight">*</span> Confirm Password</div></td>
<td class='tableCellOne'>input type="password" name="password_confirm" value="" maxlength="40" class="input" size="25" ></td>
</tr><tr>
<td class='tableCellTwo'>
<div class='defaultBold'><span class="highlight">*</span> Screen Name</div>
<div class='itempad'>If you leave this field blank, your screen name will be the same as your username</div>
</td>
<td class='tableCellOne'>input type="text" name="screen_name" value="" maxlength="50" class="input" size="25" ></td>
</tr><tr>
<td class='tableCellTwo'>div class='defaultBold'><span class="highlight">*</span> Email Address</div></td>
<td class='tableCellOne'>input type="text" name="email" value="" maxlength="72" class="input" size="40" ></td>
</tr><tr>
<td class='tableCellTwo'>div class='defaultBold'><span class="highlight">*</span> Confirm Email Address</div></td>
<td class='tableCellOne'>input type="text" name="email_confirm" value="" maxlength="72" class="input" size="40" ></td>
</tr><tr>
<td colspan='2' class='tableCellOne'>
<div class="itempadbig">
<div class="itempad"><div class='defaultBold'>Terms of Service</div></div>
<textarea name='rules' class='textarea' rows='8' cols='90' readonly>
All messages posted at this site express the views of the author, and do not necessarily reflect the views of the owners and administrators of this site.
By registering at this site you agree not to post any messages that are obscene, vulgar, slanderous, hateful, threatening, or that violate any laws. We will permanently ban all users who do so.
We reserve the right to remove, edit, or move any messages for any reason.
</textarea>
</div>
</td>
</tr><tr>
<td colspan='2' class='tableCellOne'>
<input type="hidden" name="group_id" id="group_id" value="6" />
<input type='checkbox' name='accept_terms' value='y' /> <span class="alert">I agree to the terms of service</span>
<input type="submit" value="Submit" class="submit" /></p>
<span class="highlight">*</span> Indicates required fields
</td>
</tr>
</table>
</form>
</div>