Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

userGroup -> visitor -- help needed

Guest
Dec 05, 2008 Dec 05, 2008
How can I automatically append a "visitor" value to a user when they register to my site? I have a userGroup column in my database and I want to grant certain permissions to "admins" and others to "visitors" on my site. I tried a hidden field in my form, named it "userGroup", and set it's value as "visitor". I can see that when someone registers, no userGroup value is being appended (the field in the database is blank). Which means I either did the hidden field wrong, or something just isn't working correctly. Please help!

Your help is greatly appreciated!

Matt
TOPICS
Server side applications
418
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 06, 2008 Dec 06, 2008
I resolved this issue. I was walking through a tutorial that had me insert the hidden field after the form was already built. I decided to go back and do the form all over again with the userGroup hidden field (value = visitor) attached. It works now.

- Matt
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 08, 2008 Dec 08, 2008
mtrueblood wrote:
> I resolved this issue. I was walking through a tutorial that had me insert the
> hidden field after the form was already built. I decided to go back and do the
> form all over again with the userGroup hidden field (value = visitor) attached.
> It works now.

Be very careful using this method, as hidden form fields can be changed
by bots, or anyone else wanting to get into your application. If they
change it to admins, they can create an account which has more access
than they should and cause havoc. You should put this value in the
server side code, not in a form field.

Dooza
--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 08, 2008 Dec 08, 2008
couldn't you just set the default value in the database to "visitor"?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 08, 2008 Dec 08, 2008
LATEST
Andy-K wrote:
> couldn't you just set the default value in the database to "visitor"?

Thats the best way to do it.

Dooza
--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines