original_string: public function update_info(array $d)
    {
      if ( $this->check_session() ){
        $update = [];
        foreach ( $d as $key => $val ){
          if (
            ($key !== $this->fields['id']) &&
            ($key !== $this->fields['cfg']) &&
            ($key !== 'auth') &&
            ($key !== 'pass') &&
            \in_array($key, $this->fields)
          ){
            $update[$key] = $val;
          }
        }
        if ( \count($update) > 0 ){
          $r = $this->db->update(
                  $this->class_cfg['tables']['users'],
                  $update,
                  [$this->fields['id'] => $this->id]);
          /** @todo Why did I do this?? */
          $this->set_session(['cfg' => false]);
          $this->_user_info();
          return $r;
        }
      }
      return false;
    }
code: public function update_info(array $d)
    {
      if ( $this->check_session() ){
        $update = [];
        foreach ( $d as $key => $val ){
          if (
            ($key !== $this->fields['id']) &&
            ($key !== $this->fields['cfg']) &&
            ($key !== 'auth') &&
            ($key !== 'pass') &&
            \in_array($key, $this->fields)
          ){
            $update[$key] = $val;
          }
        }
        if ( \count($update) > 0 ){
          $r = $this->db->update(
                  $this->class_cfg['tables']['users'],
                  $update,
                  [$this->fields['id'] => $this->id]);
          /** @todo Why did I do this?? */
          $this->set_session(['cfg' => false]);
          $this->_user_info();
          return $r;
        }
      }
      return false;
    }
code_tokens: public function update_info ( array $ d ) { if ( $ this -> check_session ( ) ) { $ update = [ ] ; foreach ( $ d as $ key => $ val ) { if ( ( $ key !== $ this -> fields [ 'id' ] ) && ( $ key !== $ this -> fields [ 'cfg' ] ) && ( $ key !== 'auth' ) && ( $ key !== 'pass' ) && \ in_array ( $ key , $ this -> fields ) ) { $ update [ $ key ] = $ val ; } } if ( \ count ( $ update ) > 0 ) { $ r = $ this -> db -> update ( $ this -> class_cfg [ 'tables' ] [ 'users' ] , $ update , [ $ this -> fields [ 'id' ] => $ this -> id ] ) ; /** @todo Why did I do this?? */ $ this -> set_session ( [ 'cfg' => false ] ) ; $ this -> _user_info ( ) ; return $ r ; } } return false ; }
docstring: Changes the data in the user's table.
  
  @param array $d The new data
  
  @return bool
docstring_tokens: Changes the data in the user s table .