Email confirmation on customer registration
Verfasst: Fr 13. Jul 2012, 16:54
Is there a way to use the we:tags to send an email when a customer registers to confirm his/her email address?
Thanks,
Michael.
Thanks,
Michael.
Das Forum für die webEdition-Community
https://forum.webedition.org/
Code: Alles auswählen
http://_ _ _ _ _/authorise.php?we_cid=<we:sessionField type="print" name="ID" />
Code: Alles auswählen
<we:customer>
<we:form id="self" method="post" xml="true">
<input type="hidden" name="s[ID]" value="<we:var type="request" name="we_cid" />">
<input id="Password" type="hidden" name="s[Password]" value="<we:field type="text" name="Customer_Password" />">
<p><input type="submit" value="Confirm" /></p>
</we:form>
</we:customer>
Code: Alles auswählen
<we:sessionStart />
<we:ifSelf id="201">
<we:saveRegisteredUser />
</we:ifSelf>
Code: Alles auswählen
<we:sessionStart />
<we:ifSelf id="200">
<we:saveRegisteredUser register="true" />
<we:sendMail id="202" subject="Confirm email address" recipient="Customer_Email" recipientBCC="[----------]" from="[----------]" mimetype="text/html" />
</we:ifSelf>
<we:ifSelf id="201">
<we:saveRegisteredUser />
</we:ifSelf>
Code: Alles auswählen
<we:ifNotRegisteredUser>
<we:form id="200" method="post" xml="true">
<we:sessionField type="hidden" name="ID" />
<we:sessionField type="hidden" name="Username" autofill="true" />
<we:sessionField type="hidden" name="Password" autofill="true" />
<we:sessionField type="hidden" name="Customer_AuthCode" autofill="true" />
<p><label for="Username">Email*:</label><br />
<we:sessionField name="Customer_Email" id="Customer_Email" type="textinput" xml="true" /></p>
<p><label for="Customer_Password">Password*:</label><br />
<we:sessionField name="Customer_Password" id="Customer_Password" type="password" xml="true" /></p>
<p>Required fields * <input type="submit" value="Register" /> <input type="reset" value="Reset" /></p>
</we:form>
</we:ifNotRegisteredUser>
Code: Alles auswählen
<we:ifRegisteredUser>
<p>Please check your email for a message containing the account confirmation link.</p>
</we:ifRegisteredUser>
Code: Alles auswählen
Hi,<br /><br />
Thanks for signing up. Please confirm your registration by clicking on the link below:<br /><br />
http://<?php print $_SERVER['SERVER_NAME']; ?>/authorise.php?we_cid=<we:sessionField type="print" name="ID" />&auth=<we:sessionField type="print" name="Customer_AuthCode" /><br /><br />
When the confirmation page loads click on the confirm button to complete the process. After
confirmation your account will be authorised and you will be able to access the downloadable
files.
Code: Alles auswählen
<we:setVar to="global" nameto="auth" from="request" namefrom="auth" />
<we:ifRegisteredUser>
<we:customer>
<we:ifVar name="Customer_AuthCode" match="\$auth" type="sessionfield" operator="equal">
<we:form id="self" method="post" xml="true">
<we:sessionField type="hidden" name="ID" />
<input id="Customer_Auth" type="hidden" name="s[Customer_Auth]" value="1">
<input id="Username" type="hidden" name="s[Username]" value="<we:sessionField type="print" name="Customer_Email" />">
<input id="Password" type="hidden" name="s[Password]" value="<we:sessionField type="print" name="Customer_Password" />">
<p><input type="submit" value="Confirm" /></p>
</we:form>
<we:else />
Sorry, your authorisation code does not match our records. Please re-register and
confirm your email address by clicking on the link sent to your email address.
</we:ifVar>
</we:customer>
</we:ifRegisteredUser>
<we:ifRegisteredUser permission="Customer_Auth" match="1" matchType="exact">
[download link]
</we:ifRegisteredUser>