Glad it worked for you.
v/r,
Jeff
Mark Fuqua wrote:
Hey Jeff,
It worked! It took me awhile 'cause I kept trying to put it after the first
inside <cfif> rather than right before the closing tag of the outer most
<cfif> (as long as the user was successfully logged in, my session variable
was not set. It was only being set when the login failed! Which of course
it never did. I don't know much, but I know my own plum password.)
Thanks again, I can't tell you how relieved I am. The applications I am
working on rely on being able to put two different plum users into the same
record (different fields). This happens with about twelve tables, but with
all of them, one of the plum users is always the session.user. I was bummed
when I figured out I could not insert both of them using PK to FK
relationships. But now I am happy, happy, happy.
Thanks again,
Mark Fuqua
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark
Fuqua
Sent: Wednesday, July 20, 2005 2:01 PM
To: [email protected]
Subject: RE: [plum] Plum and cookies/session variables questions?
Jeff,
Thank you very much. I have not made the changes yet, but it looks easy
enough.
I just KNEW, with David and Adam having done such a wickedly good job
designing PLUM, this had to be a possibility.
Thank you for the time you put into responding. I really appreciate it and
I look forward to the time when I am knowledgeable enough to respond to
other's posts.
Thank you,
Mark
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jeff
Fleitz
Sent: Wednesday, July 20, 2005 12:14 PM
To: [email protected]
Subject: Re: [plum] Plum and cookies/session variables questions?
I have a bad habit of sending posts before they are ready...
I wanted to mention that if you add a sesssion structure to track addtional
user info, you will need to modify the
SELECT query in the GetUser function in the security.cfc component, to
include the additional fields in the PlumUser table.
Jeff
Jeff Fleitz wrote:
Hi Mark,
Are you using sessions? If you are, this is pretty easy to do, if you
are willing to modify the security.cfc component. If you decide to do
this, please make sure to make a backup copy. Once you make the mods you
will have to re-run setup.
Inside the AuthenticateAndAuthorizeViaDatabase function in the
security.cfc you can add code to the following block:
<cfif userQuery.RecordCount NEQ 1>
default code here...
</cfif>
By changing to:
<cfif userQuery.RecordCount NEQ 1>
default code here...
<cfelse>
<!--- new code here --->
<cfset Session.userID = userQuery.UserID>
</cfif>
Now the userID is available throughout the session and you can use it as
you need to.
Just place a PassColumnToAction tag inside of the InsertRecord:
<cf_PassColumnToAction column="userID" type="integer"
value="#Session.UserID#" valueIfEmpty="NULL">
What I have done, in my own apps is to modify the PlumUser table to
include other fields which track useful user info, like last login
datetime, number of times logged in. Then you can create a structure to
keep track of these session settings.
<cfif userQuery.RecordCount NEQ 1>
default code here...
<cfelse>
<cfset Session.User = StructNew()>
<cfscript>
Session.User.userID = userQuery.UserID;
Session.User.lastLogin = userQuery.LastLogin;
Session.User.timesLoggedIn = userQuery.TimesLoggedIn +1;
Session.User.rowsPerPage = userQuery.RowsPerPage;
Session.User.displayIcons = userQuery.DisplayIcons;
</cfscript>
</cfif>
Make sense?
Jeff
Mark Fuqua wrote:
Hey there,
I can see from the docs how to get a cookie and set a variable to be = to
that cookies value [<cfset userID =
Application.CookieAPI.GetCookie("userID")>].
How can I then use this in an insert?
Is there a way to pass this value to PLUM's <cf_InsertRecord> custom tag?
Or perhaps insert this value as the default value in a text field in
<cf_displayAddForm>?
Additionally, is there a way to set a session variable and then use it
the
same ways?
Thanks for your help.
Mark Fuqua
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************
**********************************************************************
You can subscribe to and unsubscribe from lists, and you can change
your subscriptions between normal and digest modes here:
http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
**********************************************************************