render('index'); } function login() { $login = $this->data['CakeUser']['login']; $passwd = $this->data['CakeUser']['passwd']; $data = $this->CakeUser->getAclData($login, md5($passwd)); if(!empty( $data ) ) { $this->CakeAuth->set( $data['CakeUser'] ); $this->redirect($this->CakeAuth->lastUrl); } else { $this->redirect('/cake_login/'); } exit(); } function logout() { $this->CakeAuth->logout(); $this->redirect('/'); exit(); } } ?>