I understand I should be able to use the User plugin via [mydomain.com]/users/[controller] e.g. mydomain.com/users/login or possibly mydomain.com/users/users/login, but it comes up Error: The requested address '/users/users/login' was not found on this server.
login seems allowed in UsersController.php as it comes: protected function _setupAuth() {$this->Auth->allow('add', 'reset', 'verify', 'logout', 'view', 'reset_password', 'login');
plugins are loaded, as cake schema shell didn't work until it was.
AppController's beforefilter:
public $components = array(
'Session',
'Auth'
);
public function isAuthorized($user) {
return true;
}
function beforeFilter() {
$this->Auth->allow('index');
$this->set('logged_in', $this->Auth->loggedIn());
$this->set('current_user', $this->Auth->user());
$this->Auth->authorize = 'controller';
$this->Auth->fields = array('username' => 'email', 'password' => 'passwd');
$this->Auth->loginAction = array('plugin' => 'users', 'controller' => 'users', 'action' => 'login', 'admin' => false);
$this->Auth->loginRedirect = '/';
$this->Auth->logoutRedirect = '/';
$this->Auth->authError = __('Sorry, but you need to login to access this location.', true);
$this->Auth->loginError = __('Invalid e-mail / password combination. Please try again', true);
$this->Auth->autoRedirect = true;
$this->Auth->userModel = 'User';
$this->Auth->userScope = array('User.active' => 1);
if ($this->Auth->user()) {
$this->set('userData', $this->Auth->user());
$this->set('isAuthorized', ($this->Auth->user('id') != ''));
}
}
}
Other pages I've written (not plugins) seem to work fine.
It comes with a UsersAppController.php...
What am I missing?
Thanks so much!