I've had this one before. The answer is really simple, too.

$html->link(
        'Logout',
        array(
                'admin' => 0,
                'controller'=>'users',
                'action'=>'logout'
        )
);

If you're using 1.3.x you should get in the habit of using
$this->Html->whatever() as the $html-> style is deprecated.

On Thu, Apr 14, 2011 at 8:47 PM, Sergio <[email protected]> wrote:
> Hi having the same problem, let me rephrase it:
>
> I have a logout link that is generated with:
>
> <?php echo
> $html->link('Logout',array('controller'=>'users','action'=>'logout')); ?>
>
> It works perfectly from any place, except when I'm in the admin/acl
>
> If I click LOGOUT in the admin/acl the url generated by the above command
> is:
>
> www.example.com/admin/acl/users/logout
>
> rather than
>
> www.example.com/users/logout
>
> I'm sure it is a simple issue but as I'm new to cake it doesn't seem obvious
> ;)
>
> cheers,
>
> Sergio
>
> "Be kind whenever possible. It's always possible" - 14DL
>
>
> --
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Logging-out-from-Admin-that-should-point-to-App-Users-Controller-tp3329158p4304448.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to