Re: Routing to 2 controllers?

2014-12-21 Thread rc . gojinny
Thanks for clarifying regarding routes. Could you clarify what you mean It be a simple `if` statement that calls one of two of the controllers `private` or `protected` methods which contain the login for wether the username is Bob or BobsShop. I have a UsersController and a ShopsController,

Re: Routing to 2 controllers?

2014-12-21 Thread John Andersen
Hi Can I assume that you have implemented authentication in your CakePHP application using the Auth component? See the CakePHP book here about Authentication: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html Take specially a look at the section Identifying users and

Re: flash session and authentication not work in production

2014-12-21 Thread Sekou Dioubate
when looking around I realized that this is the session component which not. proof, the following code does not work: 1. $this-Session-write('test','testval'); 2. debug($this-Session-read()); but with this php code next working well: 1. session_start

Re: flash session and authentication not work in production

2014-12-21 Thread HK
You should point out what you want to read. Code should be: 1. $this-Session-write('test','testval'); 2. debug($this-Session-read('test')); On Sunday, December 21, 2014 8:40:31 PM UTC+2, Sekou Dioubate wrote: when looking around I realized that this is the session component which

[no subject]

2014-12-21 Thread SANJU PARMAR
-- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to

How to associate 3 models (or structure a search) to achieve the following structure (Cake 2.x)

2014-12-21 Thread Chris
Hi all! I'm quite new to Cake and this is my first project. I'm working on a customer database. For larger business customers the relationships get a little complicated. I have 3 models, Customer, CustomerAddress and CustomerContact. A customer can have many addresses, and many contacts, but

Re: Routing to 2 controllers?

2014-12-21 Thread . .
Thanks for the replies. I guess my question is still unclear, and yes, I am using Auth. What I am trying to do is implement a URL similar to facebook. For example, I want to have www.xyz.com/Bob/{actions} (routes to UserController) www.xyz.com/BobsStore/{actions} (routes to ShopsController). I

Re: Routing to 2 controllers?

2014-12-21 Thread Andrew Lechowicz
Ok. Here's a Gist of what your code might look like: https://gist.github.com/alecho/e7b573cc54140ba1706d By making the methods private it means that CakePHP won't let them be publicly callable methods. This avoids redirects so that your url is still the same too. I think this approach is