/** * add * * @param object $setup * @return void * @author Andy Bennett */ public function add($setup = false) { // check if user has permission to edit $data = array('action' => 'add', 'name' => $this->name, 'role' => User::instance()->get_role()); Event::run('steamcore.aclcheck', $data); crud_helper::run_form($this->setup['name'], $this->setup['model'], false); }
/** * show the user their profile for editing * * @return void * @author Andy Bennett */ public function profile() { $id = User::instance()->id; if (!$id) { throw new Exception('auth.invalid_user'); } $form = crud_helper::run_form('auth', $this->setup['model'], $id, 'profile'); }