src/libraries/adapters/DatabaseMySql.php
/**
    * Update the information for the user record.
    * This method overwrites existing values present in $params.
    *
    * @param string $id ID of the user to update which is always 1.
    * @param array $params Attributes to update.
    * @return boolean
    */
Update the information for the user record.
This method overwrites existing values present in $params.

@param string $id ID of the user to update which is always 1.
@param array $params Attributes to update.
@return boolean
Update the information for the user record . This method overwrites existing values present in $params . @param string $id ID of the user to update which is always 1 . @param array $params Attributes to update . @return boolean
public function postUser($params)
  {
    $params = $this->prepareUser($params);
    if(isset($params['password']) && !empty($params['password']))
    {
      $sql = "UPDATE `{$this->mySqlTablePrefix}user` SET `password`=:password,`extra`=:extra WHERE `id`=:id";
      $params = array(':id' => $this->owner, ':password' => $params['password'], ':extra' => $params['extra']);
    }
    else
    {
      $sql = "UPDATE `{$this->mySqlTablePrefix}user` SET `extra`=:extra WHERE `id`=:id";
      $params = array(':id' => $this->owner, ':extra' => $params['extra']);
    }
    $res = $this->db->execute($sql, $params); 
    return ($res == 1);
  }
public function postUser ( $ params ) { $ params = $ this -> prepareUser ( $ params ) ; if ( isset ( $ params [ 'password' ] ) && ! empty ( $ params [ 'password' ] ) ) { $ sql = " UPDATE ` { $ this -> mySqlTablePrefix } user` SET `password`=:password,`extra`=:extra WHERE `id`=:id " ; $ params = array ( ':id' => $ this -> owner , ':password' => $ params [ 'password' ] , ':extra' => $ params [ 'extra' ] ) ; } else { $ sql = " UPDATE ` { $ this -> mySqlTablePrefix } user` SET `extra`=:extra WHERE `id`=:id " ; $ params = array ( ':id' => $ this -> owner , ':extra' => $ params [ 'extra' ] ) ; } $ res = $ this -> db -> execute ( $ sql , $ params ) ; return ( $ res == 1 ) ; }
Update the information for the user record.
Update the information for the user record .