function as_array() { $data = parent::as_array(); unset($data['password']); unset($data['email_address']); $data['roles'] = $this->getRoles(true); $data['prefs'] = $this->getPrefs(true); return $data; }
public function create(Model $model, Validation $validation = NULL, Validation $default_validation = NULL) { $model->valid($validation, $default_validation); return DB::insert($this->_table)->columns($model->columns())->values($model->as_array())->execute($this->_db); }