Skip to main content
Participant
May 22, 2006
Answered

Someone please help - user authentication

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!!
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer
May 22, 2006
Use CFLOCATION.

5 replies

MikeyBabyAuthor
Participant
May 23, 2006
jdeline, you are officially my saviour!!

Thank you so so much!!!
Translate
MikeyBabyAuthor
Participant
May 22, 2006
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
Translate
Correct answer
May 22, 2006
Use CFLOCATION.
Translate
Inspiring
May 22, 2006
How are you defining the groups. Is it coming from a database, cflogin, etc..?
Translate
MikeyBabyAuthor
Participant
May 22, 2006
The login info is all coming from a database; the DB fields are userName, userPass and userStatus (which is either Member of Administrator)
Translate