DB 조작을 통해 Kunena Forum의 글(message) 작성자를 수정하는 방법입니다. 이 방법은 MySQL을 기준으로 합니다.

 

1. [사이트]_kunena_messages 테이블 작업

  • message id : 500
  • 현재 작성자 : userid -> 300, username -> kim
  • 변경 작성자 : userid -> 400, username -> lee
update [사이트]_kunena_messages
set userid = '400', username = 'lee'
where id = '500'
and userid = '300'
and username = 'kim';
  • where 절의 userid와 username 조건은 optional, 만약 좀 더 안전하게 update 하고자 한다면 넣어줍니다.
  • modified_by는 수정된 적이 있는 경우 값이 있을 것이고 아니면 NULL 값입니다. 필요에 따라 update 합니다.

여기까지만 하면 글 자체의 작성자는 바뀌어 보여도 목록의 작성자는 바뀌어 있지 않습니다.

2. [사이트]_kunena_topics 테이블 작업

  • topic id : 150
  • 현재 작성자 : userid -> 300, username -> kim
  • 변경 작성자 : userid -> 400, username -> lee
update [사이트]_kunena_topics
set first_post_userid = '400', first_post_guest_name = 'lee'
where id = '181'
and first_post_userid = '300'
and first_post_guest_name = 'kim’;
  • 필요에 따라 last_post_userid, last_post_guest_name도 update 합니다.