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.
Email confirmation on customer registration
-
- webEdition Partner
- Beiträge: 330
- Registriert: Mi 28. Apr 2004, 00:27
- Wohnort: Münster
- Kontaktdaten:
Re: Email confirmation on customer registration
Hi Michael,
using only we:tags without PHP probably won't work.
I found an answer by Thomas to a similar question http://forum.webedition.org/viewtopic.p ... ten#p62810 : more or less translated: "after the customer has sent the form write the password to an extra field in the Customer module. Additionally a fill a field with a random value. Then send a mail to the customer including a link to a page where you check the params: the random value and maybe the ID of the customer. If the values are correct, copy the password from the etra field to the password field. This could be combined with an expiry date"
Maybe that gives you a hint.
Ludger
using only we:tags without PHP probably won't work.
I found an answer by Thomas to a similar question http://forum.webedition.org/viewtopic.p ... ten#p62810 : more or less translated: "after the customer has sent the form write the password to an extra field in the Customer module. Additionally a fill a field with a random value. Then send a mail to the customer including a link to a page where you check the params: the random value and maybe the ID of the customer. If the values are correct, copy the password from the etra field to the password field. This could be combined with an expiry date"
Maybe that gives you a hint.
Ludger
----
ludger müller
gestaltung für bildschirm und papier aus münster in westfalen
bureau.artbeit.de
-----
Gründungsmitglied im webEdition e.V.
ludger müller
gestaltung für bildschirm und papier aus münster in westfalen
bureau.artbeit.de
-----
Gründungsmitglied im webEdition e.V.
-
- Senior Member
- Beiträge: 160
- Registriert: Mi 4. Feb 2004, 02:39
- Wohnort: London / UK
- Kontaktdaten:
Re: Email confirmation on customer registration
Hi Ludger,
Thanks, I was searching the forum but didn't find the post you mentioned, I will give it a go and will report back.
Thanks,
Michael.
Thanks, I was searching the forum but didn't find the post you mentioned, I will give it a go and will report back.
Thanks,
Michael.
-
- Senior Member
- Beiträge: 160
- Registriert: Mi 4. Feb 2004, 02:39
- Wohnort: London / UK
- Kontaktdaten:
Re: Email confirmation on customer registration
Hi Ludger,
I have the suggested method working for a web user who has an active session and am using the session ID (we_cid) and the tag we:customer to present a form for the user to confirm the email address and to copy the real password from the temporary to the real field. This method is using we:tags without the need for custom php code.
I now need to do the same but without the session running, can I use we:saveRegisteredUser without an active session?
This is the code I'm testing without luck
Email link:
Form:
MasterTemplate:
I have the suggested method working for a web user who has an active session and am using the session ID (we_cid) and the tag we:customer to present a form for the user to confirm the email address and to copy the real password from the temporary to the real field. This method is using we:tags without the need for custom php code.
I now need to do the same but without the session running, can I use we:saveRegisteredUser without an active session?
This is the code I'm testing without luck
Email link:
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>
-
- Senior Member
- Beiträge: 160
- Registriert: Mi 4. Feb 2004, 02:39
- Wohnort: London / UK
- Kontaktdaten:
Re: Email confirmation on customer registration
Ok, this is what I ended up with. It's based on we:tags and should be easy for most people to implement. If there are any issues or obvious improvements with this method please contribute.
The Customer Management module requires the following extra fields:
Customer_Email
Customer_Password
Customer_AuthCode
Customer_Auth
Master template (MasterTemplate.tmpl):
Sign up page (Register.tmpl):
Pre-confirmation page (ID: 200, PreConfirm.tmpl):
Confirmation email (ID:201, PreConfirmEmail.tmpl):
Post-confirm page (authorise.php, PostConfirm.tmpl):
The Customer Management module requires the following extra fields:
Customer_Email
Customer_Password
Customer_AuthCode
Customer_Auth
Master template (MasterTemplate.tmpl):
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>
-
- Junior Member
- Beiträge: 1
- Registriert: Do 4. Feb 2016, 12:49
Re: Email confirmation on customer registration
Additionally a fill a field with a random value. Then send a mail to the customer including a link to a page where you check the params:????
Ali
Wer ist online?
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast