@nsy,
I have made the necessary amendments to @madebym's code.
The following version should work the way you want it to -
Please test it and let me know.
Regarding your other question on SMTP mailer - please see viewtopic.php?f=8&t=8720
Hope it helps.
I have made the necessary amendments to @madebym's code.
The following version should work the way you want it to -
- Code: Select all
<?php require_once( '../couch/cms.php' ); ?>
<cms:template title='Registration' hidden='1' />
<cms:if k_member_logged_in >
<!-- what is an already logged-in member doing on this page? Send back to homepage. -->
<cms:redirect k_site_link />
</cms:if>
<!-- are there any success messages to show from previous actions? -->
<cms:set success_msg="<cms:get_flash 'success_msg' />" />
<cms:if success_msg >
<div class="notice">
Your account registration info has been received!<br>
You will receive an email once your account has been created.
</div>
<cms:else />
<!-- show the registration form -->
<h1>Create an account</h1>
<cms:form enctype="multipart/form-data" method='post' anchor='0'>
<cms:if k_success >
<!--
The 'member_process_registration_form' tag below expects fields named
'member_displayname', 'member_name' (optional), 'member_email',
'member_password' and 'member_password_repeat'
-->
<cms:set submitted_values=k_success />
<cms:member_process_registration_form
_send_mail='0'
/>
<cms:if k_success >
<cms:send_mail from=k_email_from to=k_email_to subject='New account registration' debug='1'>
The following is an email sent by a user who registered for an account on xyz.com:
<cms:show submitted_values />
</cms:send_mail>
<cms:set_flash name='success_msg' value='1' />
<cms:redirect k_page_link />
</cms:if>
</cms:if>
<cms:if k_error >
<font color='red'><cms:each k_error ><cms:show item /><br /></cms:each></font>
</cms:if>
Screen Name:<br />
<cms:input name='member_displayname' type='text' /><br />
Email Address:<br />
<cms:input name='member_email' type='text' /><br />
Password:<br />
<cms:input name='member_password' type='password' /><br />
Repeat Password:<br />
<cms:input name='member_password_repeat' type='password' /><br />
<input type="submit" name="submit" value="Create account"/>
</cms:form>
</cms:if>
<?php COUCH::invoke(); ?>
Please test it and let me know.
Regarding your other question on SMTP mailer - please see viewtopic.php?f=8&t=8720
Hope it helps.