public function index() { $user = $this->Auth->User(); $this->set('user', $user); $user = new User(); $this->set('canCreatePassword', $user->canCreatePassword()); $this->title = 'Ustawienia konta'; }
public function profile() { if ($this->Auth->loggedIn()) { $user = $this->Auth->User(); $this->set('user', $user); $user = new User(); $this->set('canCreatePassword', $user->canCreatePassword()); } else { $this->redirect(array('action' => 'login')); } }