Profil > Picture Hide for users

yanick beaulieu Posted in Technical Support 9 months ago

Hello, I would like to use this code to hide all images in a user's album as well as all albums

<?php if(ossn_isLoggedin() && ossn_loggedin_user()->guid == $params['user']->guid){ ?><?php }?>
Replies
Catalan Yanick beaulieu Replied 9 months ago

I put this code at the beginning of each page on which I want it to take effect and so you can no longer navigate the pages of others it brings you back to your own page

German Michael Zülsdorff Replied 9 months ago

Can you tell us any results on this one?

Catalan Yanick beaulieu Replied 9 months ago

Thank you, I'll try to see what I can do

German Michael Zülsdorff Replied 9 months ago

Well,
knowing whether your code would really work would mean to know ALL places in advance where you need to add it.
The left side of the comparison is not the problem: ossn_loggedin_user()->guid is a function that would reliably return the id of the logged in member. But what about $params? It's just a multi-purpose variable used throughout Ossn. Sometimes it may include the User object, but sometimes it may not. And in the latter case your comparison can't be accomplished.

Catalan Yanick beaulieu Replied 9 months ago

OK, but is it possible? I'm working on a project for a private community and I'm looking to see if the requests can do it! I know the external tools but I want to develop but even if the link cannot be blocked I have found a temporary solution to bypass what I want to do!

Indonesian Arsalan Shah Replied 9 months ago

Simply use a cloud facility (like google drive) for users where they can just upload private things and share if they want, you don't need social network :)

Catalan Yanick beaulieu Replied 9 months ago

😅 The goal is not to deactivate it but to keep the photos private only to be

German Michael Zülsdorff Replied 9 months ago

Ok,
but why not simply jump to your Ossn adminstrator page and choose
Components -> OssnPhotos -> Disable ?
This way there'll be no more albums without any coding.