CakeDC/users — Issue #46: when extending render()
Author: talco
Created: 2012-02-27 13:46:20+00:00
State: open

you should fix 2.0 version of your readme

controller extend. function render()

replace this:

public function render($action = null, $layout = null, $file = null) {
if (is_null($action)) {
$action = $this->action;
}
if (!file_exists(VIEWS . $this->viewPath . DS . $action . '.ctp')) {
$file = App::pluginPath('users') . 'views' . DS . 'users' . DS . $action . '.ctp';
}
return parent::render($action, $layout, $file);
}

with this:

public function render($action = null, $layout = null, $file = null) {
if (is_null($action)) {
$action = $this->action;
}
if (!file_exists(APP.DS.'View'. $this->viewPath . DS . $action . '.ctp')) {
$file = App::pluginPath('Users') . 'View' . DS . 'Users' . DS . $action . '.ctp';
}
return parent::render($action, $layout, $file);
}