예제 #1
0
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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');
 }