original_string: public function save_cfg()
    {
      if ( $this->check() ){
        $this->db->update(
            $this->class_cfg['tables']['users'],
            [$this->fields['cfg'] => json_encode($this->cfg)],
            [$this->fields['id'] => $this->id]);
      }
      return $this;
    }
code: public function save_cfg()
    {
      if ( $this->check() ){
        $this->db->update(
            $this->class_cfg['tables']['users'],
            [$this->fields['cfg'] => json_encode($this->cfg)],
            [$this->fields['id'] => $this->id]);
      }
      return $this;
    }
code_tokens: public function save_cfg ( ) { if ( $ this -> check ( ) ) { $ this -> db -> update ( $ this -> class_cfg [ 'tables' ] [ 'users' ] , [ $ this -> fields [ 'cfg' ] => json_encode ( $ this -> cfg ) ] , [ $ this -> fields [ 'id' ] => $ this -> id ] ) ; } return $ this ; }
docstring: Saves the user's config in the cfg field of the users' table
  return connection
docstring_tokens: Saves the user s config in the cfg field of the users table return connection