CMS for the late garbage.fm
1<?php
2
3class AdminProfileController extends ApplicationController {
4 static $session = "on";
5 static $before_filter = array(
6 "authenticate_user",
7 "require_logged_in_user",
8 );
9
10 static $verify = array(
11 array("method" => "post",
12 "only" => array("update"),
13 "redirect_to" => ADMIN_ROOT_URL,
14 ),
15 );
16
17 static $filter_parameter_logging = array("password");
18
19 static $layout = "admin";
20
21 public function index() {
22 $this->page_title = "Profile";
23 }
24
25 public function update() {
26 if ($this->user->update_attributes($this->params["user"])) {
27 $this->add_flash_success("Successfully updated profile.");
28 return $this->redirect_to(ADMIN_ROOT_URL);
29 }
30 else
31 $this->render(array("action" => "index"));
32 }
33}
34
35?>