original_string: public function set_password($old_pass, $new_pass){
      if ( $this->auth ){
        $pwt = $this->class_cfg['tables']['passwords'];
        $pwa = $this->class_cfg['arch']['passwords'];
        $stored_pass = $this->db->select_one($pwt, $pwa['pass'], [
          $this->class_cfg['arch']['passwords']['id_user'] => $this->id
        ], [
          $this->class_cfg['arch']['passwords']['added'] => 'DESC'
        ]);
        if ( $this->_check_password($old_pass, $stored_pass) ){
          return $this->force_password($new_pass, $this->get_id());
        }
      }
      return false;
    }
code: public function set_password($old_pass, $new_pass){
      if ( $this->auth ){
        $pwt = $this->class_cfg['tables']['passwords'];
        $pwa = $this->class_cfg['arch']['passwords'];
        $stored_pass = $this->db->select_one($pwt, $pwa['pass'], [
          $this->class_cfg['arch']['passwords']['id_user'] => $this->id
        ], [
          $this->class_cfg['arch']['passwords']['added'] => 'DESC'
        ]);
        if ( $this->_check_password($old_pass, $stored_pass) ){
          return $this->force_password($new_pass, $this->get_id());
        }
      }
      return false;
    }
code_tokens: public function set_password ( $ old_pass , $ new_pass ) { if ( $ this -> auth ) { $ pwt = $ this -> class_cfg [ 'tables' ] [ 'passwords' ] ; $ pwa = $ this -> class_cfg [ 'arch' ] [ 'passwords' ] ; $ stored_pass = $ this -> db -> select_one ( $ pwt , $ pwa [ 'pass' ] , [ $ this -> class_cfg [ 'arch' ] [ 'passwords' ] [ 'id_user' ] => $ this -> id ] , [ $ this -> class_cfg [ 'arch' ] [ 'passwords' ] [ 'added' ] => 'DESC' ] ) ; if ( $ this -> _check_password ( $ old_pass , $ stored_pass ) ) { return $ this -> force_password ( $ new_pass , $ this -> get_id ( ) ) ; } } return false ; }
docstring: Change the password in the database after checking the current one
  @return boolean
docstring_tokens: Change the password in the database after checking the current one