Here's what I'm trying to do. I'm building a module that only our Professional 
Staff can access, I am trying to identify where the person logged in is a pro 
staff member or a student staffer. When they log into our CMS, there is a 
session variable that returns their profile id. it is: 
#Session.Profile.profileID#

We have two tables: 
Table 1: pro_profile
Primary key: profileID
This contains all users, their information etc... 

Table 2: mod_userStatus
Primary key: 
Sec Key: profileID
This is simply a primary key with a secondary key of profileID. If a person is 
on this list they are a prostaffer, if not they are a student.

I'm trying to query the database and return boolean if the user exists on 
mod_userStatus. If yes, they can access the page, if no, redirect. 

Here's the CFC. 

    <cffunction name="isStudentEmployee" returntype="boolean" hint="Method to 
determine if the person logged in is a student or pro staffer, will corelate to 
a control structure if student employee throw up access denied">
        <cfquery datasource="#DSN#" name="isStudentEmployee">
                SELECT
                profileID
            FROM
                mod_userStatus
                WHERE
                #Session.Profile.profileID# = profileID
        </cfquery>

      <cfreturn true>  
    </cffunction>

When I run this, it just gives me a blank page, returns nothing and no error. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341385
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to