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

Someone please help - user authentication

New Here ,
May 21, 2006 May 21, 2006

Copy link to clipboard

Copied

Hi guys and girls!

I've created a login system for a site that has two groups of users - administrators and members. My login system is working fine, and when logged in the user goes to the members area.

However, I'm trying to edit the login system so that people in the 'Administrator' group go to admin.cfm and 'Member's go to member.cfm. I've tried using one of the tutorials in the developer centre, but it doesn't seem to have helped much.

If it makes any difference, I am using CF7. Thanks a lot, whoever helps will be doing me such a big favour!!
TOPICS
Advanced techniques

Views

337

Translate

Translate

Report

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

correct answers 1 Correct answer

Deleted User
May 22, 2006 May 22, 2006
Use CFLOCATION.

Votes

Translate

Translate
Explorer ,
May 21, 2006 May 21, 2006

Copy link to clipboard

Copied

How are you defining the groups. Is it coming from a database, cflogin, etc..?

Votes

Translate

Translate

Report

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 ,
May 21, 2006 May 21, 2006

Copy link to clipboard

Copied

The login info is all coming from a database; the DB fields are userName, userPass and userStatus (which is either Member of Administrator)

Votes

Translate

Translate

Report

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 ,
May 22, 2006 May 22, 2006

Copy link to clipboard

Copied

OK, I'm trying a new approach to this. When the user logs in, I'm going to have their user status displayed via the tag #Session.MM_UserAuthorization#. However, my new theory is that if this is administrator, then an additional link appears that will take them to the admin page.

I've tried the following cfif statement, but am presented with an Invalid CFML construct error:

<cfif Session.MM_UserAuthorization = "Administrator">
<a href="admin.cfm"> <cfoutput>#Session.MM_UserAuthorization#</cfoutput></a>
<cfelse><cfoutput>#Session.MM_UserAuthorization#</cfoutput>
</cfif>

Would someone please be able to advise me on where exactly that statement is wrong? Again, any help would be much appreciated

Votes

Translate

Translate

Report

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
May 22, 2006 May 22, 2006

Copy link to clipboard

Copied

Use CFLOCATION.

Votes

Translate

Translate

Report

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 ,
May 23, 2006 May 23, 2006

Copy link to clipboard

Copied

LATEST
jdeline, you are officially my saviour!!

Thank you so so much!!!

Votes

Translate

Translate

Report

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
Resources
Documentation