Forums / Setup & design / [solved] Question about user registration (email)

[solved] Question about user registration (email)

Author Message

Nathan Kelly

Wednesday 09 November 2005 8:43:47 pm

Hi all, just a little question about the user registration process. When a user registers they receive an email containing their details, the template for this is located at "user/registrationinfo.tpl", so I created an override to make it look the way I need it, no problems here.

The admin also receives an email when a user registers, but I can't find the template that is responsible for this email.

Can anyone point me in the right direction please?

Cheers!

Pardon me while I burst into flames...

Bruce Morrison

Wednesday 09 November 2005 8:54:51 pm

Hi Nathan

You are looking for

standard/templates/user/registrationfeedback.tpl

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nathan Kelly

Wednesday 09 November 2005 9:39:57 pm

Thankyou Bruce, I just found it actually, but thanks no less.

I have another question now however, I'm testing the registration validation by submitting the form without data I know to be required. The problem is that the validation is only looking at the "user account" datatype and seems to be ignoring my custom fields.

So for example if I fill in the fields:

Username:
Password:
Confirm Password:
Email:

But I leave all other required fields like:

First Name:
Last Name:
etc.

No validation warning is triggered, but if I miss the username password(s) and email field the warning is triggered.

I'm using the standard registration template which uses -

{section show=$validation.processed}
{section name=UnvalidatedAttributes loop=$validation.attributes show=$validation.attributes}
#warning
{section-else}
#feedback
{/section}
{/section}

Should I be using the validation from the standard feedback form instead, or in conjunction with this?

{include name=Validation uri='design:content/collectedinfo_validation.tpl' class='warning' validation=$validation collection_attributes=$collection_attributes}

Cheers!

Pardon me while I burst into flames...

Bruce Morrison

Wednesday 09 November 2005 10:05:06 pm

Hi Nathan

I'm not sure how you are approaching this, but the extra fields (name surname etc) should be part of a user content class. If these attributes are marked as required in the content class definition then user/register will honour them.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Nathan Kelly

Wednesday 09 November 2005 10:47:56 pm

Hmm, thats what I thought but it seems to ignore them completly for some reason, meaning a user can register without a name and sirname, I've registered about 4 new users and not once has it pulled me up.

I've tried combining the collectedinfo validation with the validation code on the register form but with no success so far.

I'll keep at it though I'm sure it should work.

Cheers!

Pardon me while I burst into flames...

Nathan Kelly

Sunday 13 November 2005 3:46:28 pm

I'm still not able to get the validation working on my user register or user edit forms.

I've tried everything I can think of but nothing seems to work, my forms are simple enough.

---- Required Fields --------------

First Name: 		[text line]
Surname:		[text line]
User Account:
Username:		[text line]
Password:		[password]
Confirm Password:	[password]
Email Address:		[email]

---- Optional Fields -------------

Company:		[text line]
Address:		[text line]
City/Region:		[text line]
State:			[text line]
Postcode:		[text line]
Phone Number:		[text line]

----------------------------------
			   [submit]

The registration form and the user edit form are practically the same apart from one thing.

The registration form uses this for validation:-

{section show=$validation.processed}
{section name=UnvalidatedAttributes loop=$validation.attributes show=$validation.attributes}

	<div class="warning">

		<h4>{'Registration details did not validate'|i18n("design/standard")}</h4>
	
		<ul>
			<li>{$UnvalidatedAttributes:item.name}: {$UnvalidatedAttributes:item.description}</li>
		</ul>
	
	</div>

{section-else}

	<div class="feedback">

		<h3>{'Registration successfull'|i18n("design/standard")}</h3>
		
		<p>I need to put a paragraph here</p>

	</div>
					

{/section}
{/section}

While the user form uses an include: {include uri="design:content/edit_validation.tpl"} which looks like this:-

{section show=$validation.processed}
{section show=or($validation.attributes,$validation.placement)}

	<div class="warning">

{section show=and($validation.attributes,$validation.placement)}
		<h3>{'Validation failed'|i18n("design/standard")}</h3>

{section-else}
{section show=$validation.attributes}
		<h3>{'Input did not validate'|i18n("design/standard")}</h3>
		
{section-else}
		<h3>{'Location did not validate'|i18n("design/standard")}</h3>
		
{/section}
{/section}
		<ul>

{section name=UnvalidatedPlacements loop=$validation.placement show=$validation.placement}
			<li>{$:item.text}</li>
			
{/section}
{section name=UnvalidatedAttributes loop=$validation.attributes show=$validation.attributes}
			<li>{$:item.name|wash}: {$:item.description}</li>
			
{/section}

		</ul>
		
	</div>

{section-else}
{section show=$validation_log}
	<div class="warning">

		<h3>{'Input was partially stored'|i18n("design/standard")}</h3>

{section name=ValidationLog loop=$validation_log}
		<h4>{$:item.name|wash}:</h4>
		
		<ul>

{section name=LogMessage loop=$:item.description}
			<li>{$:item}</li>
				
{/section}

		</ul>

{/section}
	</div>
	
{section-else}
	<div class="feedback">
	
		<h3>{'Input was stored successfully'|i18n("design/standard")}</h3>

	</div>
					
{/section}
{/section}
{/section}

Unfortunately both of these validation scripts only honour the user account sections within my forms, they completely ignore my custom required fields within the user class, namely first name and surname.

Is there something else I need to do to allow my custom fields to be included in the validation process? Any ideas greatly appreciated.

Cheers!

Pardon me while I burst into flames...

Nathan Kelly

Wednesday 16 November 2005 4:01:24 pm

I hate to bump a post but there's no point starting a new one.

I'm still unable to get this validation problem solved, if anyone has ever had this problem before I'd really appreciate some advice.. maybe someone from eZsystems has some ideas? :o

Cheers!

Pardon me while I burst into flames...

Nathan Kelly

Tuesday 06 December 2005 1:16:24 am

Hi, I worked out what the problem was.

My "First Name" and "Surname" fields were set as "Information Collectors", this was interrupting the validation process though I could not find any documentation that suggested this would be a problem within the user class.

Cheers!

Pardon me while I burst into flames...

Nicolas OTTAVI

Friday 09 December 2005 12:50:02 am

So I did you do to get it works ? Make your fied non information collector ?