On Monday 22 January 2007 06:00, indoven wrote:
> Thanks Hydra.
> The code was based on https://trac.cakephp.org/ticket/943.
>
> With the suggested changes it doesn't work.
I think you also forgot to assign a value to $logged.
function admin_index() {
$username = $this->Session->read('user')
Thanks Hydra.
The code was based on https://trac.cakephp.org/ticket/943.
With the suggested changes it doesn't work. Perhaps I need to upgrade
to 1.2.
Anyone done this with 1.1 and have a code sample?
--~--~-~--~~~---~--~~
You received this message because you a
php functions can have many returns. Proccessing stops (and returns) at
the first one the program logic reaches:
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---
First, in your admin_index() function, in the if statement:
$this->redirect('/admin/xyz'); should be INSIDE the {} like this:
if ($logged)
{
$this->redirect('/admin/xyz');
}
Second, in the same function, in your else clause, you have 2 return
statements. Unless I'm mistaken, a function can
Hello,
I'm using Cake 1.1 stable. Trying to get admin access authenticated as
posted by phpNut a while back.
After login I get redirected back to the login page.
What's wrong with my code?
function admin_index() {
$username = $this->Session->read('user');