More updates for user management. The controllers don't work yet. But the login link in the header wil open up a login box like the mockup

This commit is contained in:
Tim Almdal
2008-11-12 03:40:49 +00:00
parent 49e44f29f2
commit 1da2428183
8 changed files with 173 additions and 8 deletions
+32 -7
View File
@@ -17,16 +17,41 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class User_Controller extends Controller {
public function login() {
class User_Controller extends REST_Controller {
protected $resource_type = "user";
/**
* @see Rest_Controller::_get($resource)
*/
public function _get($user) {
$template = new View("user_registration.html");
// @todo: this needs to be data-driven
$theme = new Theme("default", $template);
$template->set_global('user', Session::instance()->get('user', null));
print $template->render();
}
public function logout() {
/**
* @see Rest_Controller::_put($resource)
*/
public function _put($resource) {
throw new Exception("@todo User_Controller::_put NOT IMPLEMENTED");
}
public function register() {
/**
* @see Rest_Controller::_post($resource)
*/
public function _post($resource) {
throw new Exception("@todo User_Controller::_post NOT IMPLEMENTED");
}
/**
* @see Rest_Controller::_delete($resource)
*/
public function _delete($resource) {
throw new Exception("@todo User_Controller::_delete NOT IMPLEMENTED");
}
}