close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Vetting of user registration

Thread began 2/03/2012 7:34 am by bill3786 | Last modified 9/10/2012 8:26 am by Jason Byrnes | 4395 views | 21 replies |

bill3786

Vetting of user registration

Because the site is to be trade only supply, the client wants to vet the registration of new users before allowing full access to the site to view product prices (which are now hidden until logged in).

Been looking at an old thread on double opt-in showthread.php?t=14143 but this doesnt seem to be exactly what the client is asking for.

I have previously successfully added company name and an extra address line to the registration page and under-estimated the time it took to complete this exercise because it involved changes to update, confirm, checkout and all the backend pages for the orders and user tables.

Therefore I would welcome your comments and if feasable a breakdown of what would be required for implementing the vetting system described above.

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to add a new column to the users table for validated, set the default value to 0.

in the login page, double click the authenticate user behavior, on the second tab, click the plus button and select the validated column, enter the value 1 for the comparison.


on your admin pages, you will need a way for the admin to update the validated column from 0 to 1

Sign in to reply to this post

bill3786

Ok, many thanks. Does the registration page send information to the client that a user has registered or does this need to be added?

Obviously the client would need to know asap about the new registration so that the vetting can be done without delay and a response sent to the user.

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to add universal email to the registration to send the email

Sign in to reply to this post

bill3786

Ok, thought that would be needed. Will try it out and post result, thanks.

Sign in to reply to this post

bill3786

I've managed to get the user validation system set up successfully with all the backend for amending the new column for user validation.

A couple of problems which I need to resolve, been trying but need help.

1. I need to set up an access rule to show up in the following situation. If a user has successfully completed and submitted the registration page and then tries to log in before the registration is validated I would like to show a message "Your registration has not been validated, if you need any more information please ...... etc."

The current rule "Invalid email or password" is now displayed when the user is not validated (which I need to retain as it is, so that when a validated user does make an error while logging in, this standard message is shown) but I would like the specific validation rule described above to show for the "registered but not validated" situation.

2. I can't get the automatic registration email to send to the user and admin when a user registers. I have included the UE code after the insert record code and I have moved the insert record redirect to the UE redirect.

The site is not yet live and is running on a Xampp local testing server. I have successfully got Xampp to send emails by including my own hosting smtp details in the c:\xampp\php\php.ini file in the section shown below

[mail function]
; For Win32 only.
; smtp
SMTP = smtp.tiscali.co.uk (this was set at SMTP=localhost but if you put in your own smtp details it works for xampp)
; smtp-port
smtp_port = 25

This works perfectly for my contact page and the forgot password page where it actually sends real emails to the designated email addreses. Unfortunately it doesnt work for the registration page (maybe its because the registration page in particular needs to be on a live server!)

I've included the registration page.

Attached Files
registration.zip
Sign in to reply to this post

Jason ByrnesWebAssist

1) ok, for this you will need to the user level authentication. instead of setting the login to restrict if the verified column equals 0, set up user levels for verified and non verified. In the archived documentation section of the security assist support page, there is a tutorial for user level authentication.


2) when you test the registration, make sure you are not using the same email that you are using for the to address, if the from and to address are the same, most servers will not relay the email.

Sign in to reply to this post

bill3786

Not done point 1 yet, still to do. But a question on point 2.

The emailing of the registration to user through xampp now works, it was because the "from field" was not in email format, I just had some text in it.

1. However I cant find way to change the date format and time zone display at the top of the registration email.

2. Also I cant see where to change the text label in the left column of the registration email which displays the users entered registration details.

It currently has the text "Registration group Email", "Registration group Password" etc which needs to be just "Email", "Password" etc

I've tried changing labels in a number of places but I've not found the correct location to achieve this.

Sign in to reply to this post

bill3786

A couple of other questions I should have added to my earlier post.

1. I'd like to add the users "first name" and "last name" into the email top line to show.

Thanyou (first name) (last name) for registering etc.

2. There are a couple of fields at the bottom of the registration email, just above Additional Notes. They are Hidden Field and Registration submit. What are these used for and if not needed can I delete them or hide them from view. Where can I find these, is it the same place as the labels in my previous post?

Sign in to reply to this post

Jason ByrnesWebAssist

any changes to the email body need to happen in the email template file.

1) in the template, the code that displays the date is:

php:
<?php echo date("n-j-Y"$now); ?>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<?php echo date("g:i A T"$now); ?>




you can change the format that is displayed by changing the first part of the data function, for example:
n-j-Y

uses the month number without leading zeros, day of the month without leading zeros and 4 digit year.

see the php data manual for ,more details on the different formats.
function.date.php

2) the code to show the label is:

php:
<?php echo(str_replace("_"," ",$pkey)); ?>



you can get rid of the unwanted part of the label by adding another str_replace function:

php:
<?php echo(str_replace("_"," ",str_replace("Registration_group_","",$pkey))); ?>



3) To display the first name and last name in the email use the following code:

php:
welcome <?php echo((isset($_POST["Registration_group_First_Name"])?$_POST["Registration_group_First_Name"]:""); ?> <?php echo((isset($_POST["Registration_group_Last_Name"])?$_POST["Registration_group_Last_Name"]:""); ?>




4) the hidden field and registration submit are the submit button and a hidden fieild used for honey pots validation.

you can remove them from the email by editing the $removeBegins array:

php:
$removeBegins = array();

$removeBegins[] = "Security";



to:

php:
$removeBegins = array();

$removeBegins[] = "Security";
$removeBegins[] = "Hidden_Field";
$removeBegins[] = "Registration_submit";
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...