minor update, I had to retest for the cookie to "uncheck" the remember
me box if the user deselects it later on..

                <cfif isDefined("cookie.bRememberMe") and
len(trim(cookie.bRememberMe))>



On Apr 29, 10:09 am, Chris Roth <[email protected]> wrote:
> To keep it simple I went with the example Blair provided.
>
> I'm using a tweaked version of the Active directory plugin, so I set
> the cookie value to the user name in ../plugins/myADPlugin/packages/
> security/myAdPlugin.cfc
>
> The in ../plugins/MyADPlugin/webskin/farLogin/displayLogin.cfm I have:
>
>           <cfif isDefined("cookie.bRememberMe")>
>                    <cfset stObject= structnew() />
>                    <cfset stObject.typename = "farLogin" />
>                    <cfset stObject.ObjectID =
> "#application.fc.utils.createJavaUUID()#" />
>                    <cfset stObject.username = cookie.bRememberMe />
>                    <cfset stObject.password = "" />
>                    <cfset stObject.bRememberMe = 1 />
>
>                    <ft:object typename="farLogin" stObject="#stObject#"
> lFields="username,password,bRememberMe"  prefix="login" legend=""  />
>
>         <cfelse>
>
>                   <ft:object typename="farLogin"
> lFields="username,password,bRememberMe"  prefix="login" legend=""  />
>
>         </cfif>
>
> formtools/object.cfm was complaining about not having all the
> variables defined in the stObject I was passing to the stObject
> attribute so I had to pass all the field variables, typename and an
> objectid.
>
> I assumed since this is just a form object, it was ok to set the
> objectid like below..
>
>                    <cfset stObject.ObjectID =
> "#application.fc.utils.createJavaUUID()#" />
>
> Is this assumption safe?
>
> Everything seems to be working.
>
> On Apr 22, 4:28 pm, AJ Mercer <[email protected]> wrote:
>
>
>
> > ummm - that beforesave() bit would need to be fired off
>
> > So when there  is a successful login, and rememer me is checked
> > you will need to update farUser ( or dpProfile cant rememebr which on it is
> > in)
>
> > On 23 April 2010 07:25, AJ Mercer <[email protected]> wrote:
>
> > > I have not done this - but this is what I am thinking
> > > in the component you set the default like this
> > > ftDefaultType="Evaluate" ftDefault="COOKIE.username"
>
> > > which would be set in beforeSave()
> > > <cfset COOKIE.username = stObj.username />
>
> > > Please post back if you get this working - I wouldn't mind adding it to my
> > > site ;-)
>
> > > On 23 April 2010 07:14, Chris Roth <[email protected]> wrote:
>
> > >> Can you throw me a snippet Blair, I dont think I get it.
> > >> Assuming I know what I want populated in the user name box how to I
> > >> modifiy this:
>
> > >> <ft:object typename="farLogin" lFields="username,password,bRememberMe"
> > >> prefix="login" legend=""  />
>
> > >> On Apr 22, 1:16 pm, Blair McKenzie <[email protected]> wrote:
> > >> > You should be able to pass in a username default too. Alternatively you
> > >> can
> > >> > pass in the stObject attribute to specify the values.
>
> > >> > Blair
>
> > >> > On Fri, Apr 23, 2010 at 3:20 AM, Chris Roth <[email protected]>
> > >> wrote:
> > >> > > I am trying to add functionality to the farLogin form
> > >> > > (displayLogin.cfm) (5.2.2)  which I have extended to my plugins
> > >> > > folder.
>
> > >> > > I am able to get a cookie set and have extended to form to include a
> > >> > > boolean check box.
>
> > >> > > The cookie is set, but I cant seem to figure out how to "prepopulate"
> > >> > > the "username" field with the cookie value.
>
> > >> > > I have this on.../ farLogin/displayLogin.cfm
>
> > >> > > ...
>
> > >> > >                <cfif isDefined("cookie.bRememberMe")>
> > >> > >                                   <cfset stMetadata = structnew() />
> > >> > >                   <cfset stMetadata.username.default =
> > >> > > cookie.bRememberMe />
> > >> > >                   <cfset stMetadata.bRememberMe.default = 1 />
> > >> > >                <cfelse>
> > >> > >                   <cfset stMetadata = structnew() />
> > >> > >                </cfif>
>
> > >> > >                <ft:object typename="farLogin"
> > >> > > lFields="username,password,bRememberMe" prefix="login" legend=""
> > >> > > stPropMetadata="#stMetadata#" />
>
> > >> > > ...
>
> > >> > > --
> > >> > > You received this message cos you are subscribed to "farcry-dev"
> > >> Google
> > >> > > group.
> > >> > > To post, email: [email protected]
> > >> > > To unsubscribe, email: 
> > >> > > [email protected]<farcry-dev%[email protected]>
> > >> <farcry-dev%[email protected]<farcry-dev%[email protected]>
>
> > >> > > For more options:http://groups.google.com/group/farcry-dev
> > >> > > --------------------------------
> > >> > > Follow us on Twitter:http://twitter.com/farcry
>
> > >> > --
> > >> > You received this message cos you are subscribed to "farcry-dev" Google
> > >> group.
> > >> > To post, email: [email protected]
> > >> > To unsubscribe, email: 
> > >> > [email protected]<farcry-dev%[email protected]>
> > >> > For more options:http://groups.google.com/group/farcry-dev
> > >> > --------------------------------
> > >> > Follow us on Twitter:http://twitter.com/farcry
>
> > >> --
> > >> You received this message cos you are subscribed to "farcry-dev" Google
> > >> group.
> > >> To post, email: [email protected]
> > >> To unsubscribe, email: 
> > >> [email protected]<farcry-dev%[email protected]>
> > >> For more options:http://groups.google.com/group/farcry-dev
> > >> --------------------------------
> > >> Follow us on Twitter:http://twitter.com/farcry
>
> > > --
>
> > > AJ Mercer
> > >http://webonix.net
> > >http://twitter.com/webonix
>
> > --
>
> > AJ Mercerhttp://webonix.nethttp://twitter.com/webonix
>
> > --
> > You received this message cos you are subscribed to "farcry-dev" Google 
> > group.
> > To post, email: [email protected]
> > To unsubscribe, email: [email protected]
> > For more options:http://groups.google.com/group/farcry-dev
> > --------------------------------
> > Follow us on Twitter:http://twitter.com/farcry
>
> --
> You received this message cos you are subscribed to "farcry-dev" Google group.
> To post, email: [email protected]
> To unsubscribe, email: [email protected]
> For more options:http://groups.google.com/group/farcry-dev
> --------------------------------
> Follow us on Twitter:http://twitter.com/farcry

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry

Reply via email to