close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

allow verified users to insert or update?

Thread began 5/12/2015 1:43 am by Paul | Last modified 5/14/2015 4:39 pm by Ray Borduin | 1101 views | 2 replies |

PaulBeta Tester

allow verified users to insert or update?

I've successfully implemented the double opt in registration on my site, showcased in a WA video.

My scenario:

I have two catgories of user, i'll call them 'type 1 and 2'. A 'type' is selcted by the user during registration.

As part of the site functionality, type 2 (only) users are allowed to edit a portfolio.


Im considering one of two approaches to create a user portfolio;

1. add a record insert triggered on a type 2 users verifying their registration email
2. place a button on the user update page, which if clicked will insert a single record.

In each case however, only one record must exist (per registered verified email) - no dupes.

When created, thereafter, the verified type 2 user can and update their portfolio only, no inserting new records permitted.

Suggestions, welcome.

Paul

Sign in to reply to this post

Ray BorduinWebAssist

I'd just have all of the fields available in the same registration table and restrict access on the update page to users that don't have a type 2 account. That way you wouldn't need a separate table or insert.

Sign in to reply to this post
Did this help? Tips are appreciated...

PaulBeta Tester

... update

Thought id share my decision.

I opted for the 'trigger an insert on email verification by user' approach!

A single record insert is triggered only if 3 conditions were met;

Does a record exist for user
Is users type account = 2
Has the email been verified email = 1

I used INNER JOIN in mysql query to pull two tables together and validate the condition above. The query would return either an exisit or not exist result to work with.

If exist, the record insert option is removed and if not exist, the insert record option is presented for the user to insert!

And it works perfectly.

Sign in to reply to this post

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...