plugins / branches / master / controllers / users_controller.php

history
<?php

/**
 * Users controller.
 *
 * @package default
 * @author John David Anderson
 */
class UsersController extends AppController {
	
	function beforeFilter() {
		$this->Auth->fields = array('username' => 'email', 'password' => 'psword');
		$this->Auth->allow(array('clogin'));
	}
	
	/**
	 * User authentication action.
	 *
	 * @return void
	 * @author John David Anderson
	 */
	function login() {}
	
	/**
	 * Login function used by command line REST clients.
	 *
	 * @return void
	 * @author John David Anderson
	 */
	function clogin() {
		$this->layout = 'xml';
		$result = false;
		$this->set('result', $this->Auth->login());
	}
}

?>