src/bbn/user/preferences.php
public function set_by_option(string $id_option, array $cfg): int
  {
    if ( $id = $this->retrieve_user_ids($id_option, $this->id_user) ){
      return $this->set($id[0], $cfg);
    }
    return $this->_insert($id_option, $cfg);
  }
public function set_by_option(string $id_option, array $cfg): int
  {
    if ( $id = $this->retrieve_user_ids($id_option, $this->id_user) ){
      return $this->set($id[0], $cfg);
    }
    return $this->_insert($id_option, $cfg);
  }
public function set_by_option ( string $ id_option , array $ cfg ) : int { if ( $ id = $ this -> retrieve_user_ids ( $ id_option , $ this -> id_user ) ) { return $ this -> set ( $ id [ 0 ] , $ cfg ) ; } return $ this -> _insert ( $ id_option , $ cfg ) ; }
Sets the permission row for the current user by the option's ID

@param string $id_option
@param array $cfg
@return int
Sets the permission row for the current user by the option s ID