• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Clear a users recent activity

Mr Lucky

Well-known member
#1
Is there a way (sql query maybe) the clear a user’s recent activity?

I need to do this for legal/privacy reasons.

Alternatively how to find it in the database and edit one or two words there?

Thanks
 

Mike

XenForo developer
Staff member
#2
You mention editing a word or two so I assume it has something to do with the content in question.

The recent activity really just comes from the content they submitted. If you remove the content, the recent activity generally won't be viewable (except to admins).
 

Mr Lucky

Well-known member
#3
The recent activity really just comes from the content they submitted. If you remove the content, the recent activity generally won't be viewable (except to admins).
But it is though (it was the occupation field)

I thought I could temporarily remove the tab for recent activity

I tried editing the member_view template and removed

Code:
<xen:if is="{$showRecentActivity}"><li><a href="{$requestPaths.requestUri}#recentActivity">{xen:phrase recent_activity}</a></li></xen:if>
But then the recent activity just showed under post stings, and postings showed under information
 

Mr Lucky

Well-known member
#4
Then I removed

Code:
<xen:if is="{$showRecentActivity}">
            <li id="recentActivity" class="profileContent" data-loadUrl="{xen:link members/recent-activity, $user}">
                <span class="JsOnly">{xen:phrase loading}...</span>
                <noscript><a href="{xen:link members/recent-activity, $user}">{xen:phrase view}</a></noscript>
            </li>
            </xen:if>
Which took out the bit I want about her occupation, but it also removed everything under the Information tab
 

Mike

XenForo developer
Staff member
#5
If you want to remove the recent activity from the template, there are 2 locations in the template you'd need to edit -- $showRecentActivity shows up twice.

If you want to just hide occupation changes, you could edit the news_feed_item_user_occupation template, though that won't be perfect.

Otherwise, if you want to remove all activity for a user:
Code:
DELETE FROM xf_news_feed WHERE user_id = X;
Changing the user_id as appropriate. (As usual, please test on a non-production database.)