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;
  }
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;
  }
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 ; }
Saves the user's config in the cfg field of the users' table
return connection
Saves the user s config in the cfg field of the users table return connection