frafra85 Posted April 23, 2013 Share Posted April 23, 2013 Hi, and excuse me for my poor english. I'm looking for a way to restrict the registration process to particular users. For example with a code ( that i send to my users ) to insert at registration moment. Is it possible ? Is there any way ? Thanks, Francesco Link to comment Share on other sites More sharing options...
vekia Posted April 23, 2013 Share Posted April 23, 2013 by default it isnt possible. If you want this feature you should edit template files of your theme. yave you got any skills with php / smarty ? without this it will be painfull work for you Link to comment Share on other sites More sharing options...
frafra85 Posted April 24, 2013 Author Share Posted April 24, 2013 Yes, i know php. Could you help me ? Link to comment Share on other sites More sharing options...
vekia Posted April 24, 2013 Share Posted April 24, 2013 you have to add some {if} conditions to your template (.tpl) file for example, you give to your customer special address: http://yourdomain.com/?registercode=123456789 then in php controllers create a cookie, for example $_COOKIE['register'] with value 1 when $_GET['registercode'] == 123456789 go to the authentication.tpl file and you've got there: <form action="{$link->getPageLink('authentication', true)}" method="post" id="create-account_form" class="std"> <fieldset> <h3>{l s='Create an account'}</h3> <div class="form_content clearfix"> <p class="title_block">{l s='Please enter your email address to create an account.'}.</p> <div class="error" id="create_account_error" style="display:none"></div> <p class="text"> <label for="email_create">{l s='Email address'}</label> <span><input type="text" id="email_create" name="email_create" value="{if isset($smarty.post.email_create)}{$smarty.post.email_create|stripslashes}{/if}" class="account_input" /></span> </p> <p class="submit"> {if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />{/if} <input type="submit" id="SubmitCreate" name="SubmitCreate" class="button_large" value="{l s='Create an account'}" /> <input type="hidden" class="hidden" name="SubmitCreate" value="{l s='Create an account'}" /> </p> </div> </fieldset> </form> move this code to the: {if $smarty.cookies.register==1} FORM CODE HERE {/if} Link to comment Share on other sites More sharing options...
Recommended Posts