Topic: Tutorial 67 Help


myfatassrocks    -- 09-19-2003 @ 10:05 PM
  I'm really new to cold fusion (2 days) I have been working my way thru some of the tutorials and now I'm stumped.

In the tutorial it says

"In order to initialize the code accompanied with this example the first user needs to be assigned to the Administrator role.  This is accomplished with a block of code located in join.cfm on line 15.  If you are going to be using this example it would make sense to delete that block of code after you sign yourself up as a user."

here is the code I hope someone knows what this means.



(<!--- the following block of code is for initialization only
     it should be removed in production code --->
<cfif isDefined("variables.memberID")>
     <cfquery name="theCount" datasource="#Application.dsn#">
          select count(id) as count
          from member
     </cfquery>
     <cfif theCount.count EQ 1>
     <cfscript>
          

Security.joinRole(Application.dsn,"Administrator",variables.securityID);
     </cfscript>
     </cfif>
</cfif>
<!--- End initialization code --->)

This message was edited by myfatassrocks on 9-19-03 @ 10:30 PM


myfatassrocks    -- 09-19-2003 @ 10:28 PM
  <!--- the following block of code is for initialization only
            it should be removed in production code --->
<cfif isDefined("variables.memberID")>
            <cfquery name="theCount" datasource="#Application.dsn#">
                        select count(id) as count
                        from member
            </cfquery>
            <cfif theCount.count EQ 1>
            <cfscript>
                       
 
Security.joinRole(Application.dsn,"Administrator",variables.securityID);
            </cfscript>
            </cfif>
</cfif>
<!--- End initialization code --->


This message was edited by myfatassrocks on 9-19-03 @ 10:32 PM


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=18&Topic=1795