03.24
php
saved
nerdMX
Note
logout does not work
logout does not work
- public function login()
- {
- if ($this->Auth->user())
- {
- {
- {
- $this->Cookie->del('User');
- }
- else
- {
- $cookie['email'] = $this->data['User']['email'];
- $cookie['token'] = $this->data['User']['pasword'];
- $this->Cookie->write('User', $cookie, true, '+2 weeks');
- }
- }
- $this->redirect($this->Auth->redirect());
- }
- else
- {
- $this->Portal->statics(); // Using Portal component
- $this->layout = 'portal';
- $this->pageTitle = 'Login :: Karamelo E-learning';
- }
- }
- public function logout()
- {
- $this->Cookie->del('User');
- $this->Session->setFlash('Logout');
- $this->redirect($this->Auth->logout());
- }
Parsed in 0.065 seconds, using GeSHi 1.0.7.14