PDA

View Full Version : Multiple account types, but only 1 available when registration



Ivan Amador
July 17, 2015, 05:14 AM
Hi,

I have 5 account types in my site, including "User" account type.

I would like to know how can I have "User" as the only account type option available when users create their accounts. And I don't want to inactivate the other account types because I want to be able to change the account type from "User" to another account type via Admin Panel after the user sign up.

Thanks!

Viktor
July 17, 2015, 08:41 AM
Hello Ivan,

Strange request. You are the first who want it. I think will be better if you create a ticket with your request and we will create it for you like a customization.

Ivan Amador
July 17, 2015, 12:58 PM
Hi Viktor,

I know this isn't a difficult modification to open a ticket. :)

Can I just modify this code in the /tpl/controllers/registration.tpl



<div class="submit-cell">
<div class="name">{$lang.account_type}</div>
<div class="field single-field">
{if $account_types|@count > 1}
<select name="profile[type]">
<option value="0">{$lang.select}</option>
{foreach from=$account_types item='account_type'}
<option value="{$account_type.ID}" {if $smarty.post.profile.type == $account_type.ID}selected="selected"{/if}>{$account_type.name}</option>
{/foreach}
</select>

{foreach from=$account_types item='account_type'}
{if $account_type.desc}<div class="qtip_cont">{$account_type.desc}</div><img class="qtip hide desc_{$account_type.ID}" src="{$rlTplBase}img/blank.gif" alt="" />{/if}
{/foreach}
{else}
{foreach from=$account_types item='account_type' name='typesF'}
{assign var='own_location' value=$account_type.Own_location}
<span class="default_size">{$account_type.name}</span>
<select name="profile[type]" class="hide">
<option value="{$account_type.ID}" selected="selected">{$account_type.name}</option>
</select>
{if $account_type.desc}
<div class="qtip_cont">{$account_type.desc}</div><img title="" class="qtip" src="{$rlTplBase}img/blank.gif" alt="" />
{/if}
{/foreach}
{/if}
</div>
</div>


to something like this:



<input type="hidden" name="profile[type]" value="40" />


Where "40" is the value for the account type I want to use.

Thanks!

Paul Gretes
March 23, 2017, 07:45 PM
I'm looking to do this exact same thing. Did you ever get it resolved?

We have 2 account types, 'Dealers' and 'Buyers'. We don't want to open up so that anyone can register as a 'Dealer'.

Can the account type be defaulted and hidden so that it will only use 'Buyers'?

Paul Gretes
March 23, 2017, 08:07 PM
Nevermind, I figured it out based on this post.
http://forum.flynax.com/showthread.php?737-Hidden-account-type&highlight=account+type

Jason Barbour
March 15, 2019, 01:13 PM
Excellent. Thanks for pointing this out.