📝 reassign_author.mdv4.6.3 · 2026-11-01

reassign_author.php — manual

Version: 1.0.1 (2026-11-01)

Alter the user in the command examples to Chipper

Version: 1.0.0 (2026-10-31)

Command-line batch job that changes the author of one or more SMF posts to another member. It does nothing unless --apply is given.

Run

Run from the forum root, next to Settings.php.

Purpose Command
Dry run php reassign_author.php --msgs=101,105-110 --to=Chipper
Apply php reassign_author.php --msgs=101,105-110 --to=Chipper --apply
Undo (dry run) php reassign_author.php --undo=BATCHID
Undo (apply) php reassign_author.php --undo=BATCHID --apply

Options:

What it changes

For each post whose author differs from the target:

  1. {prefix}messages: id_member, poster_name, poster_email are set to the target member's values.
  2. {prefix}topics: id_member_started and id_member_updated are re-synced from the topic's first and last message.
  3. {prefix}members.posts: the old author loses 1, the new author gains 1, for each countable post. A post is countable if it is approved and in a board that counts posts (boards.count_posts = 0). Guest posts (id_member = 0) have no counter to decrement.
  4. {prefix}reassign_author_backup: the original values of every changed post are stored under a batch id (YYYYMMDDHHMMSS).

Posts already authored by the target, or not found, are reported and left alone.

Safety

Not touched

Nothing else: no SMF source files, no search/log tables.

Version history