Re: Auth problem with '/' and "You are not authorized to access that location."

2009-06-27 Thread jitka (poLK)
Url '/' points by default routes to PagesController::display(), so you should call either a) in PagesController::beforeFilter(): parent::beforeFilter(); $this->Auth->allow('display'); or b) in AppController::beforeFilter(): if ($this->name == 'Pages') { $this->Auth->allow('dis

Re: Containable grabbing too much data

2009-06-27 Thread Miles J
Yeah I guess we have the same problem, and I have spent a good few hour trying to fix this with no avail. Lets hope its a bug and an official comes and sees this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakeP

Re: Containable grabbing too much data

2009-06-27 Thread delocalizer
Thanks for posting that. I also have an afterFind callback in the model that is giving me too much data, so that must be the problem. I'm kinda glad it's not because I wasn't understanding 'contain' behaviour. Unfortunately the afterFind contains some logic that I can't do without, so I'll have to

Re: Containable grabbing too much data

2009-06-27 Thread Miles J
I found the problem, but cannot fix it. Its my afterFind() method for my Article model. /** * Executed after a find() call */ function afterFind($results) { if (!empty($results)) { foreach ($results as &$result) {

Auth problem with '/' and "You are not authorized to access that location."

2009-06-27 Thread tpynegar
Hi, I've got a setup where i've got a login action at /users/login. If you go directly to that controller, action there is no error message wereas if you goto '/' as in the site address with no controller or action and then follow the routes i've got setup for '/' to /users/login you get this mes

Re: Auth->authenticate in beforeFilter causes Auth issues

2009-06-27 Thread Jorge Horacio Cué Cantú
You can set the salt to an empty strung, too. Regards 2009/6/27 Justin Poliey > > That's where I got the information I'm using now. The problem is if I > just change the hash function with Security::setHash, Cake will still > apply the salt before it hashes the passwords, so the hashes will >

Insert values question

2009-06-27 Thread Dave Maharaj :: WidePixels.com
Originally I had my ID's set as INT(11) but am going to try using the UUID CHAR(36) for the ID value So I have my old sql INSERT INTO `countries` (`id`, `iso`, `name`, `region`, `flag`) VALUES (1, 'AD', 'Andorra', 'Europe', 'ad'), (2, 'AE', 'United Arab Emirates', 'Middle East', 'flags/ae.gif'

ACL question

2009-06-27 Thread Dave Maharaj :: WidePixels.com
I am setting up a new app using ACL. I am using Role , user can only have 1 role so User model has: var $hasOne = array( 'Role' => array( 'className' => 'Role', 'foreignKey' => 'user_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '' ) ); fu

Re: Auth->authenticate in beforeFilter causes Auth issues

2009-06-27 Thread Justin Poliey
That's where I got the information I'm using now. The problem is if I just change the hash function with Security::setHash, Cake will still apply the salt before it hashes the passwords, so the hashes will still be incompatible. Thanks Justin On Jun 27, 7:06 am, John Andersen wrote: > I underst

Re: Two models how to access in one controller

2009-06-27 Thread harish rajasekaran
Thanks its working now On Jun 27, 2:19 pm, Vijay Kumbhar wrote: > Hello rajasekaran, > > Please check the model names in the $uses. > You have made a mistake in the model name of "Employees" it has to be > "Employee". > If you have any other error please post it here for more help. > > On Fri, J

Re: Auth->authenticate in beforeFilter causes Auth issues

2009-06-27 Thread John Andersen
I understand that you are using MD5 instead of SHA1 in your user model! If that is the final decision, then why don't you just tell CakePHP to use MD5 as default and as shown in the example at: http://book.cakephp.org/view/566/Change-Hash-Function Maybe that would help you! Enjoy, John On J

Re: Two models how to access in one controller

2009-06-27 Thread Vijay Kumbhar
Hello rajasekaran, Please check the model names in the $uses. You have made a mistake in the model name of "Employees" it has to be "Employee". If you have any other error please post it here for more help. On Fri, Jun 26, 2009 at 9:52 PM, harish rajasekaran < harish.rsn.av...@gmail.com> wrote:

Need help with my TidyHelper

2009-06-27 Thread Ernesto
Hello. i have this little helper that works ok with standard HTML pages but it screws up all my PDF reports class TidyHelper extends AppHelper { function __construct() { ob_start(); } function __destruct() { $output = ob_get_clean();

jsmin helper can not work with Email component.

2009-06-27 Thread joshua
In Email::__renderTemplate() $content = $View->element('email' . DS . 'text' . DS . $this->template, > array('content' => $content), true); > And below is View::element definition: > function element($name, $params = array(), $loadHelpers = false) So if the loadHelper was set true, the 'afterR

Re: loginRedirect issue

2009-06-27 Thread joshua
It seem the $this->Auth->autoRedirect didn't function. On Sat, Jun 27, 2009 at 3:10 AM, PHPScriptKiddy wrote: > > Hey guys, I'm working on my first ACL setup, but am having some > trouble with the login. I have been modelling everything after the ACL > tutorial in the cakephp cookbook. Ok here's

Auth->authenticate in beforeFilter causes Auth issues

2009-06-27 Thread Justin Poliey
Right now I'm using Cake's Auth component to build a simple user system. Pastes of the files in their entirety are available http://gist.github.com/136935 for reference. The problem is that when I call: $this->Auth->authenticate = ClassRegistry::init('User'), login.ctp always shows "Login failed.

Auth->authenticate in beforeFilter causes Auth issues

2009-06-27 Thread Justin Poliey
Right now I'm using Cake's Auth component to build a simple user system. Pastes of the files in their entirety are available http://gist.github.com/136935 for reference. The problem is that when I call: $this->Auth->authenticate = ClassRegistry::init('User'), login.ctp always shows "Login failed.

loginRedirect issue

2009-06-27 Thread PHPScriptKiddy
Hey guys, I'm working on my first ACL setup, but am having some trouble with the login. I have been modelling everything after the ACL tutorial in the cakephp cookbook. Ok here's my issue... Within the app_controller i have the following function beforeFilter() { //Configure AclComponent