src/libraries/adapters/DatabaseMySql.php
/**
    * Add a new user to the database
    * This method does not overwrite existing values present in $params - hence "new user".
    *
    * @param string $id ID of the user to update which is always 1.
    * @param array $params Attributes to update.
    * @return boolean
    */
Add a new user to the database
This method does not overwrite existing values present in $params - hence "new user".

@param string $id ID of the user to update which is always 1.
@param array $params Attributes to update.
@return boolean
Add a new user to the database This method does not overwrite existing values present in $params - hence " new user " . @param string $id ID of the user to update which is always 1 . @param array $params Attributes to update . @return boolean
public function putUser($params)
  {
    $params = $this->prepareUser($params);
    if(isset($params['password']))
    {
      $sql = "INSERT INTO `{$this->mySqlTablePrefix}user` (`id`,`password`,`extra`) VALUES (:id,:password,:extra)";
      $params = array(':id' => $this->owner, ':password' => $params['password'], ':extra' => $params['extra']);
    }
    else
    {
      $sql = "INSERT INTO `{$this->mySqlTablePrefix}user` (`id`,`extra`) VALUES (:id,:extra)";
      $params = array(':id' => $this->owner, ':extra' => $params['extra']);
    }
    $result = $this->db->execute($sql, $params);
    return $result !== false;
  }
public function putUser ( $ params ) { $ params = $ this -> prepareUser ( $ params ) ; if ( isset ( $ params [ 'password' ] ) ) { $ sql = " INSERT INTO ` { $ this -> mySqlTablePrefix } user` (`id`,`password`,`extra`) VALUES (:id,:password,:extra) " ; $ params = array ( ':id' => $ this -> owner , ':password' => $ params [ 'password' ] , ':extra' => $ params [ 'extra' ] ) ; } else { $ sql = " INSERT INTO ` { $ this -> mySqlTablePrefix } user` (`id`,`extra`) VALUES (:id,:extra) " ; $ params = array ( ':id' => $ this -> owner , ':extra' => $ params [ 'extra' ] ) ; } $ result = $ this -> db -> execute ( $ sql , $ params ) ; return $ result !== false ; }
Add a new user to the database
 This method does not overwrite existing values present in $params - hence "new user".
Add a new user to the database This method does not overwrite existing values present in $params - hence " new user " .