Forum breadcrumbs – You are here:Asgaros Support ForumSupportUser ID
Please or Register to create posts and topics.

User ID

Hi,

I erased a user, then readded him, unfortunately all his old comments are now under an “erased user” name.

How can I add back his old ID to get his name back for his old posts ?

Thx. in advance for your support,

G

 

Hello Gbr,

basically you cant do this directly because your database automatically takes care, that a new user doesnt get an ID which was already used before. Otherwise content could be assigned to a user which was never created by him. But thats what you want to do.

So you have to use a tool like phpMyAdmin and directly edit the database. You can have a look in the wp_forum_posts-table. There should be a field called author_id. What you have to do now is to manually change the number there of the posts which have the ID of the old user-account with the ID of its new user-account.

Gbr has reacted to this post.
Gbr
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

That’s what I call a quick support ! 🙂

Thx. a lot, I will follow your advice and change the author ID via the posts-table.

 

Followed your advice and everything worked like a charm. Thx. !

Another quick question : where can I modify the notifications content ? (I dont want the text of the post to appear in the notification emails.)

You can use the following filters and change the output with your custom implementation:

  • asgarosforum_filter_notify_topic_subscribers_message (new post-notification)

    • used parameters: $notification_message, $topic_name, $answer_text, $answer_link, $author_name
  • asgarosforum_filter_notify_global_topic_subscribers_message (new topic-notification)

    • used parameters: $notification_message, $topic_name, $topic_text, $topic_link, $author_name

Here you can find a tutorial on how to use filters:

Filters

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thx. Before making any mistake : should I modify these filters in the wp-content/plugins/asgaros-forum/includes/forum-notifications.php file ?

 

Please have a look at the following answer:

https://asgaros.com/support/?view=thread&id=576 

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!