Opened 2 years ago
Closed 2 years ago
#3417 closed Enhancement (Closed)
Add user default system privacy to river events for friendship and profile picture upload
| Reported by: | biondo11 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Needs Review |
| Component: | River Dashboard | Version: | 1.7 |
| Severity: | critical | Keywords: | |
| Cc: | brett@… | Difficulty: |
Description
After loading a new profile picture and adding some new friends, I realized that the news of these actions were visible in almost all site members, friends or not, in other words it was public news and It is not possibile to change this settings.
To set the default privacy system (usually friends) on new friendships and personal image upload is very simple, you can just change a few lines in some files.
The default privacy system is established by your system configuration.
In this way only friends can see your new photos and your new friends in the activity river!
Profile icon update
directory:
\mod\profile\actions\iconupload.php
line: 69
Change this:
add_to_river('river/user/default/profileiconupdate','update',$user->guid,$user->guid);
with this:
add_to_river('river/user/default/profileiconupdate','update',$user->guid,$_SESSIONuser?->guid,get_default_access($_SESSIONuser?));
New friendship
directory: site\actions\friends\add.php
Line: 29
Change this:
add_to_river('friends/river/create','friend',get_loggedin_userid(),$friend_guid);
with this:
add_to_river('friends/river/create','friend',get_loggedin_userid(),$friend_guid,$_SESSIONuser?->guid,get_default_access($_SESSIONuser?));
If you are using the friend_request plugin go to:
\mod\friend_request\actions\approve.php
On line 33 change this:
add_to_river('friends/river/create', 'friend', $user->guid, $friend->guid);
With this:
add_to_river('friends/river/create', 'friend', $user->guid, $friend->guid, get_default_access($_SESSIONuser?));
TESTED ON Elgg 1.7.6
Change History (1)
comment:1 Changed 2 years ago by biondo11
- Resolution set to Closed
- Status changed from new to closed
