Hi,

i want show in the default.ctp in the header one content that will
have link for logut or login, depending on the recording session
active.
so, i´m doing this:

views/layouts/default.ctp
<div id="header">

                        <h1>
                        <? if (isset($this->Session->read('Auth.User'))){
                         echo 'Logout';
                        }
                        else {
                         echo 'Login';
                        }?>
                        </h1>
</div>
------------------------------------------
and the users

public function login() {

                if ($this->Auth->login()) {
                        
$this->redirect($this->Auth->redirect(array('controller' =>
'ordens', 'action' => 'orden')));

}
}


but, can´t show it. it´s given to me the  Fatal error: Can't use
method return value in write context

thanks for you help

-- 
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