original_string: public function update(Listener $listener, array $input)
      {
          $user = Auth::user();
  
          if (! $this->validateCurrentUser($user, $input)) {
              return $listener->abortWhenUserMismatched();
          }
  
          $validation = $this->validator->on('changePassword')->with($input);
  
          if ($validation->fails()) {
              return $listener->updatePasswordFailedValidation($validation->getMessageBag());
          }
  
          if (! Hash::check($input['current_password'], $user->password)) {
              return $listener->verifyCurrentPasswordFailed();
          }
  
          try {
              $this->saving($user, $input);
          } catch (Exception $e) {
              return $listener->updatePasswordFailed(['error' => $e->getMessage()]);
          }
  
          return $listener->passwordUpdated();
      }
code: public function update(Listener $listener, array $input)
      {
          $user = Auth::user();
  
          if (! $this->validateCurrentUser($user, $input)) {
              return $listener->abortWhenUserMismatched();
          }
  
          $validation = $this->validator->on('changePassword')->with($input);
  
          if ($validation->fails()) {
              return $listener->updatePasswordFailedValidation($validation->getMessageBag());
          }
  
          if (! Hash::check($input['current_password'], $user->password)) {
              return $listener->verifyCurrentPasswordFailed();
          }
  
          try {
              $this->saving($user, $input);
          } catch (Exception $e) {
              return $listener->updatePasswordFailed(['error' => $e->getMessage()]);
          }
  
          return $listener->passwordUpdated();
      }
code_tokens: public function update ( Listener $ listener , array $ input ) { $ user = Auth :: user ( ) ; if ( ! $ this -> validateCurrentUser ( $ user , $ input ) ) { return $ listener -> abortWhenUserMismatched ( ) ; } $ validation = $ this -> validator -> on ( 'changePassword' ) -> with ( $ input ) ; if ( $ validation -> fails ( ) ) { return $ listener -> updatePasswordFailedValidation ( $ validation -> getMessageBag ( ) ) ; } if ( ! Hash :: check ( $ input [ 'current_password' ] , $ user -> password ) ) { return $ listener -> verifyCurrentPasswordFailed ( ) ; } try { $ this -> saving ( $ user , $ input ) ; } catch ( Exception $ e ) { return $ listener -> updatePasswordFailed ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ listener -> passwordUpdated ( ) ; }
docstring: Update password information.
  
  @param  \Orchestra\Contracts\Foundation\Listener\Account\PasswordUpdater  $listener
  @param  array  $input
  
  @return mixed
docstring_tokens: Update password information .