XF 1.5 Clear a users recent activity

Mr Lucky

Well-known member
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
 
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).
 
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
 
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
 
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.)
 
Back
Top Bottom