Re: binding models in behavior

2008-04-27 Thread senser
Hi, Mariano! Thanks for the help - your suggestion fixed my behavior. I knew for your bindable behavior in bakery but estimated it's too complex for my purpose. Thanks again for the help and happy baking. On Apr 28, 5:30 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Senser: go through the

RE: binding models in behavior

2008-04-27 Thread Mariano Iglesias
Senser: go through the API doc for bindModel() and you'll see that the changes you do through bindModel are only available for the next find() operation, after which the model bindings get reset to their original state. What you need is to tell bindModel not to reset it. On your behavior, change

Re: binding models in behavior

2008-04-27 Thread James K
http://bakery.cakephp.org/articles/view/bindable-behavior-control-your-model-bindings There's already a behavior written to do just this. It's excellent. On Apr 26, 12:07 pm, senser <[EMAIL PROTECTED]> wrote: > H!i > > I'm trying to write a simple behavior for binding models but may be I > do so

Re: Register page troubles

2008-04-27 Thread Sam Sherlock
$this->*Auth*->*userScope* = array('*User*.active' => 1); 2008/4/28 Kyle Decot <[EMAIL PROTECTED]>: > > Thanks for the response. I already have an active field which is set > to 0 when the user registers. I was asking how to check this when > doing my login. > > > > --~--~-~--~~

Re: Register page troubles

2008-04-27 Thread Kyle Decot
Thanks for the response. I already have an active field which is set to 0 when the user registers. I was asking how to check this when doing my login. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group.

Re: Register page troubles

2008-04-27 Thread Sam Sherlock
have a field called active initially save users with active set to zero only let users with active 1 login when a user signs up (or when they forget password) send them a lik to let them activate account. Forget password word deactivates the account and resets the password, sending a (re)activa

Re: Register page troubles

2008-04-27 Thread Kyle Decot
Thanks for you quick replies guys. I do however have another question. I want to check if the user has activated their account before allowing then to login, any suggestions on how to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Register page troubles

2008-04-27 Thread nate
Actually, this is the default behavior (filling in form fields) with or without the Auth component, so you'd have to unset any POST data you didn't want to show up regardless. However, the fact that the Auth component hashes an empty value when no password is provided is something worth consideri

Re: Register page troubles

2008-04-27 Thread b logica
It's a Cake "feature", actually. Auth pre-hashes the password for you (which is fine) but it also fills in the password field (which is pointlessly dumb, IMHO [1]) if the page is reloaded. You need to unset $this->data['User']['password'] if the registration method did not succeed. Also, though,

Register page troubles

2008-04-27 Thread Kyle Decot
I am making a register page for my website and am having a somewhat odd experience. If you do not enter any information and try to submit the form, the page reloads and the password field is filled with a random string as you can see here: http://www.theskateparkdirectory.com/register Does anyon

Re: Redirect path problem in production setup

2008-04-27 Thread b logica
I think Ensim is a Java app, yes? You could change your sites.xml file. Look for wrote: > > Resolved. > > For the record, the problem here was with the Ensim control panel used > by the hosting provider. Ensim apparently reserves the word 'users', > 'admin' and possibly others for its own pa

Re: Parameters in url

2008-04-27 Thread Crazy
Thank you, exactly what I was looking for, I was messing with those routes before but as you might expect, I messed up :p Works perfectly now :) On 27 apr, 21:43, majna <[EMAIL PROTECTED]> wrote: > Read:http://debuggable.com/posts/new-router-goodies:480f4dd6-4d40-4405-908... > Getting fancy with

Re: Test Suite 1.2: Importing joining table problem on HABTM fixture.

2008-04-27 Thread Defranco
no ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more option

Re: Parameters in url

2008-04-27 Thread majna
Read: http://debuggable.com/posts/new-router-goodies:480f4dd6-4d40-4405-908d-4cd7cbdd56cb Getting fancy with passing route parameters On Apr 27, 5:05 pm, Crazy <[EMAIL PROTECTED]> wrote: > I'm new to cakephp and still trying to figure out allot of stuff:) > > One of the things I'm strugeling with

Re: Twitter Component

2008-04-27 Thread strangy
I just tested status_update and direct_messages_new with my twitter account. I was able to send a direct message to my girlfriend without any problem and was also able to update my status. Check my latest status at http://twitter.com/imunitic. That last status was added using the twitter component

Re: save() keeps creating new records, not updating old ones

2008-04-27 Thread Chez17
mbavio: that was the issue, I was trying to just save the Profile model and it would keep creating new records inthe Info database instead of updating old ones. I'll try your solution to see if it works. On Apr 26, 6:09 pm, mbavio <[EMAIL PROTECTED]> wrote: > Two options: > > 1) Why not just use

Parameters in url

2008-04-27 Thread Crazy
I'm new to cakephp and still trying to figure out allot of stuff:) One of the things I'm strugeling with atm is passing parameters in the url, for example my controller is: "/series" Now I want to give an id with it to know what to show, so like "/series/" I know that you can do it with "/ser

Re: Components, how many is too many?

2008-04-27 Thread djiize
and that's where MVC and OOP are very useful MVC because: I'm pretty sure some parts of your components can be turned in Model/ Behavior/Datasource (gData, Flicker data access, ... are Model's logic) OOP because: why your ServicesController loads all components when it only needs some? Maybe you

Re: Components, how many is too many?

2008-04-27 Thread Sam Sherlock
you have the option of importing them when you need and keeping generall required (heavily used comps in the controllers) *App::import*('*Component*'.$name) same goes for models etc at least thats as I understand. 2008/4/27 mixersoft <[EMAIL PROTECTED]>: > > I am really wrestling with this one

Components, how many is too many?

2008-04-27 Thread mixersoft
I am really wrestling with this one and wanted to know if others have established a best practice. My controllers are getting to be pretty big, and different actions may need different components. Also, in the name of DRY, I have a 'services' controller that performs a lot of standard utility fu