Register tags do not work
Posted: 21 June 2009 01:00 PM   [ Ignore ]
Newbie
Rank
Total Posts:  22
Joined  2008-09-07

Hello,

I have a strange bug - the register tags won’t work in one of my projects. So, the code below only gives the output “Test Test”.

Test

{exp
:user:register} For some reason this isn't being shown {/exp:user:register}

Test 


Do you have any idea what might cause this? Most of the other User Module tags seem to be working just fine. Could a setting be conflicting with this?

(version 2.0.7)

Profile
 
 
Posted: 22 June 2009 12:50 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

When you’re viewing the template with the User:Register form code in it, are you logged in? smile

By default, EE does not let a logged in member view the Register form and outputs an EE error. User was the same until a little while ago. We’ve since adjusted it to no longer show a “hard” error, and instead show “no results”. So, you can use this now:

{exp:user:register}
Your form fields
etc
{if no_results}
You are currently logged in
so the Register Form is hidden from you.
{/if}
{
/exp:user:register} 

If you’d like to have Super Admins be able to still view/use the Register form code, you can add this parameter to your User:Register loop smile

admin_register="yes" 
 Signature 
Profile
 
 
Posted: 24 June 2009 01:24 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  22
Joined  2008-09-07

Thanks for the help!  I wasn’t aware of that.  It kind of makes sense though (admins not being able to see the register form).  Then again, if an admin wants to add users front-end, he’ll need to be able to see the form.  Loving the User module even more now wink

Profile