original_string: public function saveChanges()
      {
          if (!empty($this->newPassword)) {
              $this->setPassword($this->newPassword);
          }
          if (!empty($this->new_email)) {
              $this->generateEmailToken();
          }
          $updateActivityName = $this->isAttributeChanged('username');
          if (!$this->save(false)) {
              return false;
          }
          if ($updateActivityName) {
              Activity::updateName($this->id, $this->podiumName, $this->podiumSlug);
          }
          return true;
      }
code: public function saveChanges()
      {
          if (!empty($this->newPassword)) {
              $this->setPassword($this->newPassword);
          }
          if (!empty($this->new_email)) {
              $this->generateEmailToken();
          }
          $updateActivityName = $this->isAttributeChanged('username');
          if (!$this->save(false)) {
              return false;
          }
          if ($updateActivityName) {
              Activity::updateName($this->id, $this->podiumName, $this->podiumSlug);
          }
          return true;
      }
code_tokens: public function saveChanges ( ) { if ( ! empty ( $ this -> newPassword ) ) { $ this -> setPassword ( $ this -> newPassword ) ; } if ( ! empty ( $ this -> new_email ) ) { $ this -> generateEmailToken ( ) ; } $ updateActivityName = $ this -> isAttributeChanged ( 'username' ) ; if ( ! $ this -> save ( false ) ) { return false ; } if ( $ updateActivityName ) { Activity :: updateName ( $ this -> id , $ this -> podiumName , $ this -> podiumSlug ) ; } return true ; }
docstring: Saves user account details changes.
  @return bool
docstring_tokens: Saves user account details changes .